From fbaa3a211f8e306ddb52a425d59156b50bbc767b Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 28 Feb 2020 19:18:20 +0100 Subject: [PATCH] Add CMake option WITH_GUI. --- CMakeLists.txt | 6 +++++- README.adoc | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea409f6..6d1a0f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ project(FediPotato list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # Project build options. +option(WITH_GUI "Compile and install GUI." YES) option(WITH_TESTS "Compile tests." NO) option(WITH_DEB "Prepare for the building of .deb packages." NO) option(WITH_RPM "Prepare for the building of .rpm packages." NO) @@ -38,7 +39,10 @@ if(WITH_CLANG-TIDY) endif() add_subdirectory(lib) -add_subdirectory(gui) + +if(WITH_GUI) + add_subdirectory(gui) +endif() # if(WITH_TESTS) # add_subdirectory(tests) diff --git a/README.adoc b/README.adoc index 7e15286..d88f776 100644 --- a/README.adoc +++ b/README.adoc @@ -107,6 +107,7 @@ cmake --build . -- -j$(nproc --ignore=1) .CMake options: * `-DCMAKE_BUILD_TYPE=Debug` for a debug build. // * `-DWITH_TESTS=YES` if you want to compile the tests. +* `-DWITH_GUI=NO` to only compile and install the library. * `-DWITH_CLANG-TIDY=YES` to check the sourcecode with link:{uri-clang-tidy}[clang-tidy] while compiling. * `-WITH_DOC=YES` to generate the API documentation.