From b5764c8a9395465ae4a83ba647e74f94132401f1 Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Tue, 19 Jul 2022 23:26:11 +0200 Subject: [PATCH] Use CMAKE_INSTALL_SYSCONFDIR instead of /etc (#2770) Some distro's build infrastructure (e.g. gentoo) can use CMAKE_INSTALL_PREFIX to install to a different location. When the config path is hardcoded to /etc, CMAKE_INSTALL_PREFIX has no effect. Ref: https://bugs.gentoo.org/858797 --- CHANGELOG.md | 3 +++ CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cca1973..cfd265b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking - `custom/script`: now doesn't hide failing script if it's output is not changing ([`#2636`](https://github.com/polybar/polybar/issues/2636)). Somewhat similar behaviour can be imitated with `format-fail`, if necessary. +### Build +- Respect `CMAKE_INSTALL_PREFIX` when installing default config ([`#2770`](https://github.com/polybar/polybar/pull/2770)) + ### Deprecated - `custom/text`: The `content` setting and all its properties are deprecated in favor of `format` with the same functionality. ([`#2676`](https://github.com/polybar/polybar/pull/2676)) diff --git a/CMakeLists.txt b/CMakeLists.txt index f71801c8..0979f8af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ endif() if(BUILD_CONFIG) install(FILES ${CMAKE_SOURCE_DIR}/doc/config.ini - DESTINATION /etc/${PROJECT_NAME} + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME} COMPONENT config) endif()