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
This commit is contained in:
Patrick Ziegler 2022-07-19 23:26:11 +02:00 committed by GitHub
parent f4d0ba9186
commit b5764c8a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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))

View File

@ -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()