|
1 | 1 | cmake_minimum_required(VERSION 3.24 FATAL_ERROR) |
2 | 2 | include(CheckLanguage) |
3 | 3 |
|
4 | | -set(gtest_force_shared_crt ON CACHE BOOL "Always use msvcrt.dll" FORCE) |
5 | | - |
6 | | -add_subdirectory(googletest) |
7 | | - |
8 | | -# support version in CMakeLists.txt of portable-file-dialogs was removed from cmake. thus we include the header only library by hand |
9 | | -add_library(portable_file_dialogs INTERFACE) |
10 | | -target_include_directories(portable_file_dialogs INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/portable-file-dialogs) |
11 | | - |
12 | | -# --- CLI11 --- |
13 | | -set(CLI11_SANITIZERS OFF) |
14 | | -set(CLI11_BUILD_DOCS OFF) |
15 | | -set(CLI11_BUILD_TESTS OFF) |
16 | | -set(CLI11_BUILD_EXAMPLES OFF) |
17 | | -set(CLI11_BUILD_EXAMPLES_JSON OFF) |
18 | | -set(CLI11_SINGLE_FILE_TESTS OFF) |
19 | | -set(CLI11_INSTALL OFF) |
20 | | -set(CLI11_FORCE_LIBCXX OFF) |
21 | | -set(CLI11_CUDA_TESTS OFF) |
22 | | -set(CLI11_CLANG_TIDY OFF) |
23 | | -add_subdirectory(CLI11) |
24 | | - |
25 | 4 | # --- alpaka --- |
26 | 5 |
|
27 | 6 | # alpaka openmp backend |
@@ -97,5 +76,32 @@ if(RAYX_ENABLE_H5) |
97 | 76 | endif() |
98 | 77 | endif() |
99 | 78 |
|
| 79 | +if (RAYX_BUILD_TESTS) |
| 80 | + set(gtest_force_shared_crt ON CACHE BOOL "Always use msvcrt.dll" FORCE) |
| 81 | + |
| 82 | + add_subdirectory(googletest) |
| 83 | +endif() |
| 84 | + |
| 85 | +# --- CLI11 --- |
| 86 | +if (RAYX_BUILD_RAYX_CLI) |
| 87 | + set(CLI11_SANITIZERS OFF) |
| 88 | + set(CLI11_BUILD_DOCS OFF) |
| 89 | + set(CLI11_BUILD_TESTS OFF) |
| 90 | + set(CLI11_BUILD_EXAMPLES OFF) |
| 91 | + set(CLI11_BUILD_EXAMPLES_JSON OFF) |
| 92 | + set(CLI11_SINGLE_FILE_TESTS OFF) |
| 93 | + set(CLI11_INSTALL OFF) |
| 94 | + set(CLI11_FORCE_LIBCXX OFF) |
| 95 | + set(CLI11_CUDA_TESTS OFF) |
| 96 | + set(CLI11_CLANG_TIDY OFF) |
| 97 | + add_subdirectory(CLI11) |
| 98 | +endif() |
| 99 | + |
100 | 100 | # --- SDL --- |
101 | | -add_subdirectory(SDL EXCLUDE_FROM_ALL) |
| 101 | +if(RAYX_BUILD_RAYX_UI) |
| 102 | + # support version in CMakeLists.txt of portable-file-dialogs was removed from cmake. thus we include the header only library by hand |
| 103 | + add_library(portable_file_dialogs INTERFACE) |
| 104 | + target_include_directories(portable_file_dialogs INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/portable-file-dialogs) |
| 105 | + |
| 106 | + add_subdirectory(SDL EXCLUDE_FROM_ALL) |
| 107 | +endif() |
0 commit comments