Skip to content

Conversation

@jacky309
Copy link

This fixes an inconsistency between the folder where configuration files such as "dlt.conf" are installed, and the folder where those files are read from, at runtime.

set(CONFIGURATION_FILES_DIR ${CMAKE_INSTALL_SYSCONFDIR})

add_definitions(-DCONFIGURATION_FILES_DIR="${CMAKE_INSTALL_PREFIX}/${CONFIGURATION_FILES_DIR}")
add_definitions(-DCONFIGURATION_FILES_DIR="${CONFIGURATION_FILES_DIR}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, but not sufficient to my end.
Please use this hint:

if(CMAKE_INSTALL_PREFIX STREQUAL "/usr")            
    set(CONFIGURATION_FILES_DIR "/etc")             
else()                                              
    set(CONFIGURATION_FILES_DIR "${CMAKE_INSTALL_PREFIX}/etc")
endif()

add_definitions(-DCONFIGURATION_FILES_DIR="${CONFIGURATION_FILES_DIR}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants