-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake build: don't hardcode absolute paths in install DESTINATIONs
Fixes #683 > Currently, the CMakeLists.txt and *.conf_install.cmake.in files contain > absolute install paths, that is, not relative to ${CMAKE_INSTALL_PREFIX}. > This makes packaging this program unusually hard. Signed-off-by: Alain Zscheile <[email protected]>
- Loading branch information
Showing
3 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
if (EXISTS "/etc/logrotate.d/tcmu-runner") | ||
file(INSTALL "/etc/logrotate.d/tcmu-runner" DESTINATION "/etc/logrotate.d/tcmu-runner.bak" RENAME "tcmu-runner") | ||
if (EXISTS "${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d/tcmu-runner") | ||
file(RENAME "${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d/tcmu-runner" "${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d/tcmu-runner.bak") | ||
endif() | ||
file(INSTALL "${PROJECT_SOURCE_DIR}/logrotate.conf" DESTINATION "/etc/logrotate.d" RENAME "tcmu-runner") | ||
install(FILES "${PROJECT_SOURCE_DIR}/logrotate.conf" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d" RENAME "tcmu-runner") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
if (EXISTS "/etc/tcmu/tcmu.conf") | ||
file(INSTALL "/etc/tcmu/tcmu.conf" DESTINATION "/etc/tcmu/" RENAME "tcmu.conf.old") | ||
if (EXISTS "${CMAKE_INSTALL_FULL_SYSCONFDIR}/tcmu/tcmu.conf") | ||
file(RENAME "${CMAKE_INSTALL_FULL_SYSCONFDIR}/tcmu/tcmu.conf" "${CMAKE_INSTALL_FULL_SYSCONFDIR}/tcmu/tcmu.conf.old") | ||
endif() | ||
file(INSTALL "${PROJECT_SOURCE_DIR}/tcmu.conf" DESTINATION "/etc/tcmu/") | ||
install(FILES "${PROJECT_SOURCE_DIR}/tcmu.conf" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/tcmu") |