summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2023-03-08 14:40:10 +0100
committerSander Vrijders <[email protected]>2023-03-08 15:59:38 +0100
commit0930b871653bcbc8c6efe44345887dcf6a9f455a (patch)
tree38190c0567f13964dfe61ea019f1c1097f8f6b64
parent89b58eaa2706c54aeb0a48252d1cfbd2b5ae01b7 (diff)
downloadouroboros-0930b871653bcbc8c6efe44345887dcf6a9f455a.tar.gz
ouroboros-0930b871653bcbc8c6efe44345887dcf6a9f455a.zip
build: Fix TOML library variable
LIBTOML_LIBRARIES should be explicitly set to "" if the TOML C99 library is not present. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
-rw-r--r--src/irmd/CMakeLists.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/irmd/CMakeLists.txt b/src/irmd/CMakeLists.txt
index fb1e6ca2..8472e1e7 100644
--- a/src/irmd/CMakeLists.txt
+++ b/src/irmd/CMakeLists.txt
@@ -4,8 +4,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_BINARY_DIR}/include)
-find_library(TOML_LIBRARIES toml QUIET)
-if (TOML_LIBRARIES)
+find_library(LIBTOML_LIBRARIES toml QUIET)
+if (LIBTOML_LIBRARIES)
set(DISABLE_CONFIGFILE FALSE CACHE BOOL
"Disable configuration file support")
if (NOT DISABLE_CONFIGFILE)
@@ -14,7 +14,7 @@ if (TOML_LIBRARIES)
set(OUROBOROS_CONFIG_FILE irmd.conf CACHE STRING
"Name of the IRMd configuration file")
set(HAVE_TOML TRUE)
- message(STATUS "Found TOML C99 library: " ${TOML_LIBRARIES})
+ message(STATUS "Found TOML C99 library: " ${LIBTOML_LIBRARIES})
message(STATUS "Configuration file support enabled")
message(STATUS "Configuration directory: ${OUROBOROS_CONFIG_DIR}")
set(INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
@@ -23,7 +23,7 @@ if (TOML_LIBRARIES)
install(FILES "${CMAKE_BINARY_DIR}/irmd.conf.example"
DESTINATION "${OUROBOROS_CONFIG_DIR}")
unset(INSTALL_DIR)
- mark_as_advanced(TOML_LIBRARIES)
+ mark_as_advanced(LIBTOML_LIBRARIES)
else ()
message(STATUS "Configuration file support disabled by user")
unset(OUROBOROS_CONFIG_FILE CACHE)
@@ -33,6 +33,7 @@ if (TOML_LIBRARIES)
else ()
message(STATUS "Install tomlc99 for config file support")
message(STATUS " https://github.com/cktan/tomlc99")
+ set(LIBTOML_LIBRARIES "")
unset(DISABLE_CONFIGFILE CACHE)
unset(HAVE_TOML)
endif ()
@@ -74,7 +75,7 @@ set(SOURCE_FILES
add_executable (irmd ${SOURCE_FILES})
target_link_libraries (irmd LINK_PUBLIC ouroboros-common
- ${TOML_LIBRARIES} ${CONFINI_LIBRARIES})
+ ${LIBTOML_LIBRARIES})
include(AddCompileFlags)
if (CMAKE_BUILD_TYPE MATCHES "Debug*")