From ff197dd32d6e6eeca3b9ad7442fe7771dc94fd69 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 29 Jul 2024 23:35:46 +0200 Subject: build: Add target include directory for libtomlc99 On OS X, user-installed libraries will have their headers in /usr/local/include/ which is not automatically included. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/irmd/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/irmd/CMakeLists.txt b/src/irmd/CMakeLists.txt index c9c2e553..c7e4cbd9 100644 --- a/src/irmd/CMakeLists.txt +++ b/src/irmd/CMakeLists.txt @@ -24,6 +24,7 @@ if (LIBTOML_LIBRARIES) DESTINATION "${OUROBOROS_CONFIG_DIR}") unset(INSTALL_DIR) mark_as_advanced(LIBTOML_LIBRARIES) + find_path(LIBTOML_INCLUDE toml.h) else () message(STATUS "Configuration file support disabled by user") unset(OUROBOROS_CONFIG_FILE CACHE) @@ -83,6 +84,10 @@ add_executable (irmd ${SOURCE_FILES}) target_link_libraries (irmd LINK_PUBLIC ouroboros-common ${LIBTOML_LIBRARIES}) +if (HAVE_TOML) + target_include_directories(irmd PUBLIC ${LIBTOML_INCLUDE}) +endif () + include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES "Debug*") add_compile_flags(irmd -DCONFIG_OUROBOROS_DEBUG) -- cgit v1.2.3