summaryrefslogtreecommitdiff
path: root/src/irmd/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/CMakeLists.txt')
-rw-r--r--src/irmd/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/irmd/CMakeLists.txt b/src/irmd/CMakeLists.txt
index 79f806bb..a9584b85 100644
--- a/src/irmd/CMakeLists.txt
+++ b/src/irmd/CMakeLists.txt
@@ -20,9 +20,14 @@ if (LIBTOML_LIBRARIES)
message(STATUS "Configuration directory: ${OUROBOROS_CONFIG_DIR}")
set(INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
configure_file("${CMAKE_SOURCE_DIR}/irmd.conf.in"
- "${CMAKE_BINARY_DIR}/irmd.conf.example" @ONLY)
- install(FILES "${CMAKE_BINARY_DIR}/irmd.conf.example"
+ "${CMAKE_BINARY_DIR}/${OUROBOROS_CONFIG_FILE}.example" @ONLY)
+ install(FILES "${CMAKE_BINARY_DIR}/${OUROBOROS_CONFIG_FILE}.example"
DESTINATION "${OUROBOROS_CONFIG_DIR}")
+ install(CODE "
+ if (NOT EXISTS \"${OUROBOROS_CONFIG_DIR}/${OUROBOROS_CONFIG_FILE}\")
+ file(WRITE \"${OUROBOROS_CONFIG_DIR}/${OUROBOROS_CONFIG_FILE}\" \"\")
+ endif()
+ ")
unset(INSTALL_DIR)
find_path(LIBTOML_INCLUDE toml.h)
mark_as_advanced(LIBTOML_LIBRARIES LIBTOML_INCLUDE)