commit 72f297fc713c55fc17a0f41614a33ad2942d0979
parent d969a1dec0be697f6fe4bea52ea5559e768ef18f
Author: Drew DeVault <sir@cmpwn.com>
Date: Thu, 21 Jan 2016 15:15:50 -0500
Merge pull request #456 from gpyh/fix-config-dir
Fix issue #455
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git 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
@@ -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")) {