diff options
author | Martin Ejdestig <mejdestig@luxoft.com> | 2020-10-20 10:29:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 17:29:07 +0900 |
commit | b6f52e39d6435af3296a7ef1ef9a8e823ce36aaa (patch) | |
tree | d532ce797a0e850fcc357f74969af9e940e64393 /CMakeLists.txt | |
parent | 602ed3ef81101421822ecc2d44f0884ff981c0e6 (diff) | |
download | DLT-daemon-b6f52e39d6435af3296a7ef1ef9a8e823ce36aaa.tar.gz |
Simplify setting of CONFIGURATION_FILES_DIR in CMakeLists.txt (#247)
By using CMAKE_INSTALL_FULL_SYSCONFDIR from GNUInstallDirs.
It also fixes building with CMAKE_INSTALL_PREFIX=/ that would otherwise
warn with:
CMake Error at src/daemon/cmake_install.cmake:70 (file):
file called with network path DESTINATION. This does not make sense
when using DESTDIR. Specify local absolute path or remove DESTDIR
environment variable.
DESTINATION=
//etc
Signed-off-by: Martin Ejdestig <mejdestig@luxoft.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 850dbcf..ee37382 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,12 +171,7 @@ if(WITH_DLT_CXX11_EXT AND WITH_DLT_PKGCONFIG) install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-c++.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT devel) endif() -if(CMAKE_INSTALL_PREFIX STREQUAL "/usr") - set(CONFIGURATION_FILES_DIR "/etc") -else() - set(CONFIGURATION_FILES_DIR "${CMAKE_INSTALL_PREFIX}/etc") -endif() - +set(CONFIGURATION_FILES_DIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}) add_definitions(-DCONFIGURATION_FILES_DIR="${CONFIGURATION_FILES_DIR}") add_subdirectory(cmake) |