summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Yacine Hmito <yacine.hmito@gmail.com>2016-01-21 21:04:52 +0100
committerLibravatar Yacine Hmito <yacine.hmito@gmail.com>2016-01-21 21:08:18 +0100
commitc487cf71a5cb5617053868a3db1f4a473ff99921 (patch)
tree4252d87c803f6be90a627cbcc60b0919481ed900 /sway
parentFix memory leak in config.c (diff)
downloadsway-c487cf71a5cb5617053868a3db1f4a473ff99921.tar.gz
sway-c487cf71a5cb5617053868a3db1f4a473ff99921.tar.zst
sway-c487cf71a5cb5617053868a3db1f4a473ff99921.zip
Fix issue #455
CMAKE_INSTALL_FULL_SYSCONFIG is not actually passed to the C preprocessor. I remember it working, so I must have messed up somewhere last time I touched this. This is fixed by manually passing its value to the C preprocessor through the SYSCONFDIR definition
Diffstat (limited to 'sway')
-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
26 workspace.c 26 workspace.c
27) 27)
28 28
29add_definitions(
30 -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}"
31)
32
29target_link_libraries(sway 33target_link_libraries(sway
30 sway-common 34 sway-common
31 sway-protocols 35 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) {
197 "$XDG_CONFIG_HOME/sway/config", 197 "$XDG_CONFIG_HOME/sway/config",
198 "$HOME/.i3/config", 198 "$HOME/.i3/config",
199 "$XDG_CONFIG_HOME/i3/config", 199 "$XDG_CONFIG_HOME/i3/config",
200 "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sway/config", 200 SYSCONFDIR "/sway/config",
201 "${CMAKE_INSTALL_FULL_SYSCONFDIR}/i3/config", 201 SYSCONFDIR "/i3/config",
202 }; 202 };
203 203
204 if (!getenv("XDG_CONFIG_HOME")) { 204 if (!getenv("XDG_CONFIG_HOME")) {