diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ffb132c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.10) +project(rxterm) +set(CMAKE_CXX_STANDARD 14) +add_subdirectory(apps) diff --git a/README.md b/README.md index ff8d317..f9be8b4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -19,6 +21,14 @@ buck build :rxterm bazel build :rxterm ``` +### CMake +```bash +mkdir build +cd build +cmake .. +make +``` + To run the demo: ```bash @@ -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 ``` diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt new file mode 100644 index 0000000..8bc915b --- /dev/null +++ b/apps/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(rxterm-demo main.cpp) +target_include_directories(rxterm-demo PUBLIC ${PROJECT_SOURCE_DIR}/include)