summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}\"")