Make use of LibEfence optional
[staging/xdg-launcher.git] / samples.d / config.cmake.sample
1 ###########################################################################
2 # Copyright 2015, 2016, 2017 IoT.bzh
3 #
4 # author: Fulup Ar Foll <fulup@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 Info
20 # ------------------
21 set(PROJECT_NAME example)
22 set(PROJECT_VERSION "0.0")
23 set(PROJECT_PRETTY_NAME "Example")
24 set(PROJECT_DESCRIPTION "AGL application example")
25 set(PROJECT_URL "https://gerrit.automotivelinux.org/gerrit/apps/app-templates")
26 set(PROJECT_ICON "icon.png")
27 set(PROJECT_AUTHOR "Last Name, First Name")
28 set(PROJECT_AUTHOR_MAIL "example.man@bigouden.bzh")
29 set(PROJECT_LICENSE "APL2.0")
30 set(PROJECT_LANGUAGES,"C")
31
32 # Where are stored default templates files from submodule or subtree app-templates in your project tree
33 # relative to the root project directory
34 set(PROJECT_APP_TEMPLATES_DIR "conf.d/app-templates")
35
36 # Where are stored your external libraries for your project. This is 3rd party library that you don't maintain
37 # but used and must be built and linked.
38 # set(PROJECT_LIBDIR "libs")
39
40 # Where are stored data for your application. Pictures, static resources must be placed in that folder.
41 # set(PROJECT_RESOURCES "data")
42
43 # Which directories inspect to find CMakeLists.txt target files
44 # set(PROJECT_SRC_DIR_PATTERN "*")
45
46 # Compilation Mode (DEBUG, RELEASE)
47 # ----------------------------------
48 set(CMAKE_BUILD_TYPE "DEBUG")
49 set(USE_EFENCE 1)
50
51 # Kernel selection if needed. You can choose between a
52 # mandatory version to impose a minimal version.
53 # Or check Kernel minimal version and just print a Warning
54 # about missing features and define a preprocessor variable
55 # to be used as preprocessor condition in code to disable
56 # incompatibles features. Preprocessor define is named
57 # KERNEL_MINIMAL_VERSION_OK.
58 #
59 # NOTE*** FOR NOW IT CHECKS KERNEL Yocto environment and
60 # Yocto SDK Kernel version.
61 # -----------------------------------------------
62 #set (kernel_mandatory_version 4.8)
63 #set (kernel_minimal_version 4.8)
64
65 # Compiler selection if needed. Impose a minimal version.
66 # -----------------------------------------------
67 set (gcc_minimal_version 4.9)
68
69 # PKG_CONFIG required packages
70 # -----------------------------
71 set (PKG_REQUIRED_LIST
72         json-c
73         libsystemd>=222
74         afb-daemon
75         libmicrohttpd>=0.9.55
76 )
77
78 # Prefix path where will be installed the files
79 # Default: /usr/local (need root permission to write in)
80 # ------------------------------------------------------
81 #set(CMAKE_INSTALL_PREFIX $ENV{HOME}/opt)
82
83 # Customize link option
84 # -----------------------------
85 #list(APPEND link_libraries -an-option)
86
87 # Compilation options definition
88 # Use CMake generator expressions to specify only for a specific language
89 # Values are prefilled with default options that is currently used.
90 # Either separate options with ";", or each options must be quoted separately
91 # DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED !
92 # ----------------------------------------------------------------------------
93 #set(COMPILE_OPTIONS
94 # -Wall
95 # -Wextra
96 # -Wconversion
97 # -Wno-unused-parameter
98 # -Wno-sign-compare
99 # -Wno-sign-conversion
100 # -Werror=maybe-uninitialized
101 # -Werror=implicit-function-declaration
102 # -ffunction-sections
103 # -fdata-sections
104 # -fPIC
105 # CACHE STRING "Compilation flags")
106 #set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.")
107 #set(CXX_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C++ language.")
108 #set(PROFILING_COMPILE_OPTIONS
109 # -g
110 # -O0
111 # -pg
112 # -Wp,-U_FORTIFY_SOURCE
113 # CACHE STRING "Compilation flags for PROFILING build type.")
114 #set(DEBUG_COMPILE_OPTIONS
115 # -g
116 # -ggdb
117 # -Wp,-U_FORTIFY_SOURCE
118 # CACHE STRING "Compilation flags for DEBUG build type.")
119 #set(CCOV_COMPILE_OPTIONS
120 # -g
121 # -O2
122 # --coverage
123 # CACHE STRING "Compilation flags for CCOV build type.")
124 #set(RELEASE_COMPILE_OPTIONS
125 # -g
126 # -O2
127 # CACHE STRING "Compilation flags for RELEASE build type.")
128
129 # (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
130 # ---------------------------------------------------------------------
131 set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
132 set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib)
133
134 # Optional location for config.xml.in
135 # -----------------------------------
136 #set(WIDGET_ICON conf.d/wgt/${PROJECT_ICON} CACHE PATH "Path to the widget icon")
137 #set(WIDGET_CONFIG_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/conf.d/wgt/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)")
138
139 # Mandatory widget Mimetype specification of the main unit
140 # --------------------------------------------------------------------------
141 # Choose between :
142 #- text/html : HTML application,
143 #       content.src designates the home page of the application
144 #
145 #- application/vnd.agl.native : AGL compatible native,
146 #       content.src designates the relative path of the binary.
147 #
148 # - application/vnd.agl.service: AGL service, content.src is not used.
149 #
150 #- ***application/x-executable***: Native application,
151 #       content.src designates the relative path of the binary.
152 #       For such application, only security setup is made.
153 #
154 set(WIDGET_TYPE MimeType_Not_Set)
155
156 # Mandatory Widget entry point file of the main unit
157 # --------------------------------------------------------------
158 # This is the file that will be executed, loaded,
159 # at launch time by the application framework.
160 #
161 set(WIDGET_ENTRY_POINT EntryPoint_Path_Not_Set)
162
163 # Optional dependencies order
164 # ---------------------------
165 #set(EXTRA_DEPENDENCIES_ORDER)
166
167 # Optional Extra global include path
168 # -----------------------------------
169 #set(EXTRA_INCLUDE_DIRS)
170
171 # Optional extra libraries
172 # -------------------------
173 #set(EXTRA_LINK_LIBRARIES)
174
175 # Optional force binding Linking flag
176 # ------------------------------------
177 # set(BINDINGS_LINK_FLAG LinkOptions )
178
179 # Optional force package prefix generation, like widget
180 # -----------------------------------------------------
181 # set(PKG_PREFIX DestinationPath)
182
183 # Optional Application Framework security token
184 # and port use for remote debugging.
185 #------------------------------------------------------------
186 set(AFB_TOKEN   ""     CACHE PATH "Default binder security token")
187 set(AFB_REMPORT "1234" CACHE PATH "Default binder listening port")
188
189 # Print a helper message when every thing is finished
190 # ----------------------------------------------------
191 set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --port=${AFB_REMPORT} --workdir=${CMAKE_BINARY_DIR}/package --ldpaths=lib --roothttp=htdocs  --token=\"${AFB_TOKEN}\" --tracereq=common --verbose")
192 set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
193
194 # Optional schema validator about now only XML, LUA and JSON
195 # are supported
196 #------------------------------------------------------------
197 #set(LUA_CHECKER "luac" "-p" CACHE STRING "LUA compiler")
198 #set(XML_CHECKER "xmllint" CACHE STRING "XML linter")
199 #set(JSON_CHECKER "json_verify" CACHE STRING "JSON linter")
200
201 # This include is mandatory and MUST happens at the end
202 # of this file, else you expose you to unexpected behavior
203 # -----------------------------------------------------------
204 include(${PROJECT_APP_TEMPLATES_DIR}/cmake/common.cmake)