fix directories and options
[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 cmake_minimum_required(VERSION 2.8)
20
21 project("afm-main" LANGUAGES "C")
22
23 set(rootdir                 ".")
24 set(sysconfdir              "${rootdir}/etc")
25 set(prefix                  "${rootdir}/usr")
26 set(datadir                 "${prefix}/share")
27
28 set(afm_name                "aglfwk")
29 set(afm_confdir             "${sysconfdir}/${afm_name}")
30 set(afm_datadir             "${datadir}/${afm_name}")
31 set(afm_appdir              "${afm_datadir}/applications")
32 set(afm_icondir             "${afm_datadir}/icons")
33 set(afm_prefix              "urn:agl:")
34 set(afm_prefix_permission   "${afm_prefix}perm:")
35 set(afm_prefix_plugin       "${afm_prefix}plugin:")
36 set(afm_user_appdir         "app-data")
37 set(wgtpkg_trusted_cert_dir "${afm_confdir}/certs")
38
39 macro(defstr name value)
40         add_definitions("-D${name}=\"${value}\"")
41 endmacro(defstr)
42
43 defstr(FWK_CONFIG_DIR          "${afm_confdir}")
44 defstr(FWK_PREFIX_PERMISSION   "${afm_prefix_permission}")
45 defstr(FWK_PREFIX_PLUGIN       "${afm_prefix_plugin}")
46 defstr(FWK_ICON_DIR            "${afm_icondir}")
47 defstr(FWK_APP_DIR             "${afm_appdir}")
48 defstr(FWK_USER_APP_DIR        "${afm_user_appdir}")
49 defstr(WGTPKG_TRUSTED_CERT_DIR "${wgtpkg_trusted_cert_dir}")
50
51 add_subdirectory(src)
52
53