From b40964e9bf6177df6d5935c77b2aae5808995ccc Mon Sep 17 00:00:00 2001 From: Patryk Szczypien Date: Sat, 29 May 2021 09:57:13 +0200 Subject: [PATCH 1/3] Added CMake build support --- CMakeLists.txt | 4 ++++ README.md | 10 ++++++++++ apps/CMakeLists.txt | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 apps/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..b70a94e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.10) +project(rxterm) +set(CMAKE_CXX_STANDARD 17) +add_subdirectory(apps) diff --git a/README.md b/README.md index ff8d317..24967ff 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ buck build :rxterm # Bazel bazel build :rxterm + +# CMake +mkdir build +cd build +cmake .. +make ``` To run the demo: @@ -27,6 +33,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) From bb52da7f71140e89032f7ab275f8e0eb2d8496fc Mon Sep 17 00:00:00 2001 From: Patryk Szczypien Date: Sat, 29 May 2021 10:10:47 +0200 Subject: [PATCH 2/3] Fixed build description in README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24967ff..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 @@ -17,8 +19,10 @@ buck build :rxterm # Bazel bazel build :rxterm +``` -# CMake +### CMake +```bash mkdir build cd build cmake .. From ba810c0e11319984c0299c328e17a2a5a237bc96 Mon Sep 17 00:00:00 2001 From: Patryk Szczypien Date: Sat, 29 May 2021 10:28:05 +0200 Subject: [PATCH 3/3] Changed minimum required C++ version to C++14 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b70a94e..ffb132c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 3.10) project(rxterm) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 14) add_subdirectory(apps)