From 757c16403ef30a498477dda53ffdcbe634f27c80 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Tue, 12 Sep 2017 13:34:36 +0200 Subject: [PATCH] cmake/config: use /etc/layers.json, install it to there too. Signed-off-by: Marcus Fritzsch --- CMakeLists.txt | 5 +++++ src/config.cpp | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5aaa1d..54e2da6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,3 +81,8 @@ set(LINK_LIBCXX OFF CACHE BOOL "Link against LLVMs libc++") add_subdirectory(client-lib) add_subdirectory(src) + +install( + FILES layers.json + DESTINATION /etc + COMPONENT "runtime") diff --git a/src/config.cpp b/src/config.cpp index 1393fdd..b610c6e 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -20,8 +20,7 @@ namespace wm { config::config() : cfg() { // Supply default values for these... - this->cfg["layers.json"] = getenv("LAYERS_JSON") ?: "../layers.json"; - this->cfg["layout.json"] = getenv("LAYOUT_JSON") ?: "../layout.json"; + this->cfg["layers.json"] = getenv("LAYERS_JSON") ?: "/etc/layers.json"; } } // namespace wm -- 2.16.6