cmake/config: use /etc/layers.json, install it to there too.
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 12 Sep 2017 11:34:36 +0000 (13:34 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Thu, 14 Sep 2017 12:04:51 +0000 (14:04 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
CMakeLists.txt
src/config.cpp

index f5aaa1d..54e2da6 100644 (file)
@@ -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")
index 1393fdd..b610c6e 100644 (file)
@@ -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