diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-10-30 00:38:54 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-10-30 01:36:48 +0200 |
commit | 28f36f6087eb1ffcff7282ad22b3c84db91da816 (patch) | |
tree | f09ff0f86280e06be46d61dbb7421e2564e671a6 | |
parent | 252e349e52a44a350f42aa4331a773648c5467b8 (diff) | |
download | hex-28f36f6087eb1ffcff7282ad22b3c84db91da816.tar.gz hex-28f36f6087eb1ffcff7282ad22b3c84db91da816.tar.xz hex-28f36f6087eb1ffcff7282ad22b3c84db91da816.zip |
CMakeLists.txt: synchronize with sdtui
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 109cb90..c5a5fd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,14 +24,17 @@ option (USE_SYSTEM_TERMO if (USE_SYSTEM_TERMO) if (NOT Termo_FOUND) message (FATAL_ERROR "System termo library not found") - endif (NOT Termo_FOUND) + endif () else () + # We don't want the library to install, but EXCLUDE_FROM_ALL ignores tests add_subdirectory (termo EXCLUDE_FROM_ALL) - # We don't have many good choices when we don't want to install it and want - # to support older versions of CMake; this is a relatively clean approach - # (other possibilities: setting a variable in the parent scope, using a - # cache variable, writing a special config file with build paths in it and - # including it here, or setting a custom property on the targets). + file (WRITE ${PROJECT_BINARY_DIR}/CTestCustom.cmake + "execute_process (COMMAND ${CMAKE_COMMAND} --build termo)") + + # We don't have many good choices; this is a relatively clean approach + # (other possibilities: setting a variable in the parent scope, using + # a cache variable, writing a special config file with build paths in it + # and including it here, or setting a custom property on the targets) get_directory_property (Termo_INCLUDE_DIRS DIRECTORY termo INCLUDE_DIRECTORIES) set (Termo_LIBRARIES termo-static) |