Skip to content

Added CMake build support #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmake_minimum_required(VERSION 3.10)
project(rxterm)
set(CMAKE_CXX_STANDARD 14)
add_subdirectory(apps)
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ A C++ library for functional-reactive terminals. RxTerm is a lean alternative to

The library builds with [Buckaroo](https://buckaroo.pm) and either [Buck](https://www.buckbuild.com) or [Bazel](https://bazel.build). It requires a C++ 14 compiler.

### Buckaroo

```bash
buckaroo install

Expand All @@ -19,6 +21,14 @@ buck build :rxterm
bazel build :rxterm
```

### CMake
```bash
mkdir build
cd build
cmake ..
make
```

To run the demo:

```bash
Expand All @@ -27,6 +37,10 @@ buck run :main

# Bazel
BAZEL_CXXOPTS="-std=c++14" bazel run :main

# CMake (inside the build dir)
cd apps/
./rxterm-demo
```


Expand Down
2 changes: 2 additions & 0 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_executable(rxterm-demo main.cpp)
target_include_directories(rxterm-demo PUBLIC ${PROJECT_SOURCE_DIR}/include)