aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2015-12-21 10:45:58 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2015-12-21 10:45:58 +0100
commiteab449dec6b13464db5277c54ac23fc30d896353 (patch)
tree045239ab0755a58f6b97f61dc702859fd4f32f37 /CMakeLists.txt
parent2af512e7b590baa8754c643b60ae9dac8bcdc4b8 (diff)
Improves the packaging, adds comments
Change-Id: Ib9eb3bf010814ea043e838f2e97a692ecd12514b
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 5 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0244ace..b76abb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,20 +20,17 @@ cmake_minimum_required(VERSION 2.8)
project("afm-main" LANGUAGES "C")
+include(GNUInstallDirs)
+
macro(setc name value)
if(NOT DEFINED ${name})
set(${name} "${value}")
endif(NOT DEFINED ${name})
endmacro(setc)
-setc(rootdir "")
-setc(sysconfdir "${rootdir}/etc")
-setc(prefix "${rootdir}/usr")
-setc(datadir "${prefix}/share")
-
setc(afm_name "aglfwk")
-setc(afm_confdir "${sysconfdir}/${afm_name}")
-setc(afm_datadir "${datadir}/${afm_name}")
+setc(afm_confdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${afm_name}")
+setc(afm_datadir "${CMAKE_INSTALL_FULL_DATADIR}/${afm_name}")
setc(afm_appdir "${afm_datadir}/applications")
setc(afm_icondir "${afm_datadir}/icons")
setc(afm_prefix "urn:agl:")
@@ -43,7 +40,7 @@ setc(afm_user_appdir "app-data")
setc(wgtpkg_trusted_cert_dir "${afm_confdir}/certs")
macro(defstr name value)
- add_definitions("-D${name}=\"${value}\"")
+ add_definitions(-D${name}="${value}")
endmacro(defstr)
defstr(FWK_CONFIG_DIR "${afm_confdir}")