doc: add new document quick-tutorial
[src/app-framework-main.git] / CMakeLists.txt
1 ###########################################################################
2 # Copyright 2015 IoT.bzh
3 #
4 # author: José Bollo <jose.bollo@iot.bzh>
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #     http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 ###########################################################################
18
19 project(afm-main C)
20
21 cmake_minimum_required(VERSION 2.8)
22
23 include(GNUInstallDirs)
24
25 macro(setc name value)
26         if(NOT DEFINED ${name})
27                 set(${name} ${value})
28         endif(NOT DEFINED ${name})
29 endmacro(setc)
30
31 SET(PROJECT_NAME "AFM Main")
32 SET(PROJECT_PRETTY_NAME "Application Framework Main")
33 SET(PROJECT_DESCRIPTION "Secured Application framework")
34 SET(PROJECT_VERSION "1.0")
35 SET(PROJECT_URL "https://github.com/iotbzh/afm-main")
36
37 setc(USE_LIBZIP 1)
38 setc(USE_SIMULATION 1)
39
40 setc(afm_name                "aglfwk")
41 setc(afm_confdir             "${CMAKE_INSTALL_SYSCONFDIR}/${afm_name}")
42 setc(afm_datadir             "${CMAKE_INSTALL_DATADIR}/${afm_name}")
43 setc(afm_appdir              "${afm_datadir}/applications")
44 setc(afm_icondir             "${afm_datadir}/icons")
45 setc(afm_prefix              "urn:agl:")
46 setc(afm_prefix_permission   "${afm_prefix}perm:")
47 setc(afm_prefix_plugin       "${afm_prefix}plugin:")
48 setc(afm_user_appdir         "app-data")
49 setc(wgtpkg_trusted_cert_dir "${afm_confdir}/certs")
50
51 macro(defstr name value)
52         add_definitions(-D${name}="${value}")
53 endmacro(defstr)
54
55 defstr(FWK_CONFIG_DIR          "${afm_confdir}")
56 defstr(FWK_PREFIX_PERMISSION   "${afm_prefix_permission}")
57 defstr(FWK_PREFIX_PLUGIN       "${afm_prefix_plugin}")
58 defstr(FWK_ICON_DIR            "${afm_icondir}")
59 defstr(FWK_APP_DIR             "${afm_appdir}")
60 defstr(FWK_USER_APP_DIR        "${afm_user_appdir}")
61 defstr(WGTPKG_TRUSTED_CERT_DIR "${wgtpkg_trusted_cert_dir}")
62 defstr(FWK_LAUNCH_CONF         "${afm_confdir}/afm-launch.conf")
63
64 add_subdirectory(src)
65 add_subdirectory(conf)
66 add_subdirectory(scripts)
67
68