Store configured settings paths in header file
This commit is contained in:
parent
4760aa8a32
commit
e5c2a9c847
2 changed files with 17 additions and 1 deletions
|
@ -240,8 +240,17 @@ ENDIF (UNIX)
|
||||||
IF (UNIX AND NOT APPLE)
|
IF (UNIX AND NOT APPLE)
|
||||||
INSTALL(TARGETS ${telldus-service_TARGET} RUNTIME DESTINATION sbin)
|
INSTALL(TARGETS ${telldus-service_TARGET} RUNTIME DESTINATION sbin)
|
||||||
SET(SYSCONF_INSTALL_DIR "/etc" CACHE PATH "The sysconfig install dir (default prefix/etc)" )
|
SET(SYSCONF_INSTALL_DIR "/etc" CACHE PATH "The sysconfig install dir (default prefix/etc)" )
|
||||||
SET(STATE_INSTALL_DIR "/var/state" CACHE PATH "The directory to store state information of the devices" )
|
|
||||||
|
|
||||||
|
IF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
|
SET(STATE_INSTALL_DIR "/var/spool" CACHE PATH "The directory to store state information of the devices")
|
||||||
|
ELSE (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
|
SET(STATE_INSTALL_DIR "/var/state" CACHE PATH "The directory to store state information of the devices")
|
||||||
|
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
|
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SettingsConfusePaths.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/SettingsConfusePaths.h)
|
||||||
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
INSTALL(FILES tellstick.conf
|
INSTALL(FILES tellstick.conf
|
||||||
DESTINATION ${SYSCONF_INSTALL_DIR}
|
DESTINATION ${SYSCONF_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
|
|
7
telldus-core/service/SettingsConfusePaths.h.in
Normal file
7
telldus-core/service/SettingsConfusePaths.h.in
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#ifndef SETTINGSCONFUSEPATHS_H
|
||||||
|
#define SETTINGSCONFUSEPATHS_H
|
||||||
|
|
||||||
|
#define CONFIG_PATH "@SYSCONF_INSTALL_DIR@"
|
||||||
|
#define VAR_CONFIG_PATH "@STATE_INSTALL_DIR@"
|
||||||
|
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue