summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2015-12-18 19:27:20 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2015-12-18 19:27:20 +0100
commitafd9ca3c5c3cac30ebdef3a400e6f720d8c48f48 (patch)
treeec790c0198cb4bc80deddb72597f2e1d563288c1 /CMakeLists.txt
parenta60988dad78ea22041771a9f40ed7e8f4c63b816 (diff)
allows to define directories
Change-Id: I9d92a68c59d911575d283bb6be9676edc3463bf8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt36
1 files changed, 21 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8b8b27..0244ace 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,21 +20,27 @@ cmake_minimum_required(VERSION 2.8)
project("afm-main" LANGUAGES "C")
-set(rootdir ".")
-set(sysconfdir "${rootdir}/etc")
-set(prefix "${rootdir}/usr")
-set(datadir "${prefix}/share")
-
-set(afm_name "aglfwk")
-set(afm_confdir "${sysconfdir}/${afm_name}")
-set(afm_datadir "${datadir}/${afm_name}")
-set(afm_appdir "${afm_datadir}/applications")
-set(afm_icondir "${afm_datadir}/icons")
-set(afm_prefix "urn:agl:")
-set(afm_prefix_permission "${afm_prefix}perm:")
-set(afm_prefix_plugin "${afm_prefix}plugin:")
-set(afm_user_appdir "app-data")
-set(wgtpkg_trusted_cert_dir "${afm_confdir}/certs")
+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_appdir "${afm_datadir}/applications")
+setc(afm_icondir "${afm_datadir}/icons")
+setc(afm_prefix "urn:agl:")
+setc(afm_prefix_permission "${afm_prefix}perm:")
+setc(afm_prefix_plugin "${afm_prefix}plugin:")
+setc(afm_user_appdir "app-data")
+setc(wgtpkg_trusted_cert_dir "${afm_confdir}/certs")
macro(defstr name value)
add_definitions("-D${name}=\"${value}\"")