Add CMake option WITH_GUI.

This commit is contained in:
tastytea 2020-02-28 19:18:20 +01:00
parent 8b718f6564
commit fbaa3a211f
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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.