X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=48cb270d440186747b359002f5f896a2e087821e;hb=27b1945919874c554d6227584a77a453103da52f;hp=504162bcae201a8da7fdcce2be0e95acf7407c43;hpb=a8c5306b1d0ac21bd745ae553f59c6eb189e04a4;p=src%2Fapp-framework-main.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 504162b..48cb270 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,23 +16,34 @@ # limitations under the License. ########################################################################### +project(afm-main C) + 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(USE_LIBZIP 1) +setc(USE_SIMULATION 1) -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") +setc(afm_name "aglfwk") +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:") +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}\"") + add_definitions(-D${name}="${value}") endmacro(defstr) defstr(FWK_CONFIG_DIR "${afm_confdir}") @@ -42,7 +53,9 @@ defstr(FWK_ICON_DIR "${afm_icondir}") defstr(FWK_APP_DIR "${afm_appdir}") defstr(FWK_USER_APP_DIR "${afm_user_appdir}") defstr(WGTPKG_TRUSTED_CERT_DIR "${wgtpkg_trusted_cert_dir}") +defstr(FWK_LAUNCH_CONF "${afm_confdir}/afm-launch.conf") add_subdirectory(src) +add_subdirectory(conf)