aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sway/CMakeLists.txt4
-rw-r--r--sway/config.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt
index f7cc88ab..d23c80b0 100644
--- a/sway/CMakeLists.txt
+++ b/sway/CMakeLists.txt
@@ -26,6 +26,10 @@ add_executable(sway
workspace.c
)
+add_definitions(
+ -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}"
+)
+
target_link_libraries(sway
sway-common
sway-protocols
diff --git a/sway/config.c b/sway/config.c
index d8e1e938..c4614521 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -197,8 +197,8 @@ static char *get_config_path(void) {
"$XDG_CONFIG_HOME/sway/config",
"$HOME/.i3/config",
"$XDG_CONFIG_HOME/i3/config",
- "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sway/config",
- "${CMAKE_INSTALL_FULL_SYSCONFDIR}/i3/config",
+ SYSCONFDIR "/sway/config",
+ SYSCONFDIR "/i3/config",
};
if (!getenv("XDG_CONFIG_HOME")) {