CMakeLists.txt: synchronize with sdtui

This commit is contained in:
Přemysl Eric Janouch 2021-10-27 19:48:47 +02:00
parent ee5c41b2bf
commit 6f6efe077b
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 8 additions and 5 deletions

View File

@ -26,12 +26,15 @@ if (USE_SYSTEM_TERMO)
message (FATAL_ERROR "System termo library not found") message (FATAL_ERROR "System termo library not found")
endif (NOT Termo_FOUND) endif (NOT Termo_FOUND)
else () else ()
# We don't want the library to install, but EXCLUDE_FROM_ALL ignores tests
add_subdirectory (termo EXCLUDE_FROM_ALL) add_subdirectory (termo EXCLUDE_FROM_ALL)
# We don't have many good choices when we don't want to install it and want file (WRITE ${PROJECT_BINARY_DIR}/CTestCustom.cmake
# to support older versions of CMake; this is a relatively clean approach "execute_process (COMMAND ${CMAKE_COMMAND} --build termo)")
# (other possibilities: setting a variable in the parent scope, using a
# cache variable, writing a special config file with build paths in it and # We don't have many good choices; this is a relatively clean approach
# including it here, or setting a custom property on the targets). # (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 get_directory_property (Termo_INCLUDE_DIRS
DIRECTORY termo INCLUDE_DIRECTORIES) DIRECTORY termo INCLUDE_DIRECTORIES)
set (Termo_LIBRARIES termo-static) set (Termo_LIBRARIES termo-static)