-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (24 loc) · 949 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# this script adds all subprojects to a single build to allow IDEs understand the full project
# structure.
cmake_minimum_required(VERSION 3.14...3.22)
project(BINARY_All LANGUAGES CXX)
message(STATUS "Building all subprojects for BINARY")
include(cmake/tools.cmake)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(BINARY_BUILD_STANDALONE "Build standalone" ON)
option(BINARY_BUILD_TESTS "Build tests" ON)
option(BINARY_BUILD_DOCUMENTS "Build DOCUMENTS" OFF)
option(BINARY_BUILD_DEPENDENCIES "Build dependencies" ON)
if(BINARY_BUILD_STANDALONE)
add_subdirectory(standalone ${CMAKE_BINARY_DIR}/standalone)
else()
add_subdirectory(library ${CMAKE_BINARY_DIR}/library)
endif()
if(BINARY_BUILD_TESTS)
# needed to generate test target
enable_testing()
add_subdirectory(test ${CMAKE_BINARY_DIR}/test)
endif()
if(BINARY_BUILD_DOCUMENTS)
add_subdirectory(documentation ${CMAKE_BINARY_DIR}/documentation)
endif()