Update to use CMake app template
[apps/agl-service-windowmanager.git] / conf.d / cmake / config.cmake
1 ###########################################################################
2 # Copyright 2015, 2016, 2017 IoT.bzh
3 # Copyright (C) 2020 Konsulko Group
4 #
5 # author: Fulup Ar Foll <fulup@iot.bzh>
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 ###########################################################################
19
20 # Project Info
21 # ------------------
22 set(PROJECT_NAME "windowmanager-service")
23 set(API_NAME "windowmanager")
24 set(PROJECT_PRETTY_NAME "Window Manager")
25 set(PROJECT_DESCRIPTION "Window Manager Service")
26 set(PROJECT_URL "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-windowmanager")
27 set(PROJECT_ICON "icon.svg")
28 set(PROJECT_AUTHOR "TOYOTA")
29 set(PROJECT_AUTHOR_EMAIL "")
30 set(PROJECT_VERSION "0.1")
31 set(PROJECT_LICENSE "APL2.0")
32 set(PROJECT_LANGUAGES,"CXX")
33
34 # Which directories inspect to find CMakeLists.txt target files
35 # set(PROJECT_SRC_DIR_PATTERN "*")
36
37 # Where are stored the project configuration files
38 # relative to the root project directory
39 set(PROJECT_CMAKE_CONF_DIR "conf.d")
40
41 # Compilation Mode (DEBUG, RELEASE, COVERAGE or PROFILING)
42 # ----------------------------------
43 set(BUILD_TYPE "RELEASE")
44 #set(USE_EFENCE 1)
45
46 # Kernel selection if needed. You can choose between a
47 # mandatory version to impose a minimal version.
48 # Or check Kernel minimal version and just print a Warning
49 # about missing features and define a preprocessor variable
50 # to be used as preprocessor condition in code to disable
51 # incompatibles features. Preprocessor define is named
52 # KERNEL_MINIMAL_VERSION_OK.
53 #
54 # NOTE*** FOR NOW IT CHECKS KERNEL Yocto environment and
55 # Yocto SDK Kernel version.
56 # -----------------------------------------------
57 #set (kernel_mandatory_version 4.8)
58 #set (kernel_minimal_version 4.8)
59
60 # Compiler selection if needed. Impose a minimal version.
61 # -----------------------------------------------
62 set (gcc_minimal_version 4.9)
63
64 # PKG_CONFIG required packages
65 # -----------------------------
66 set (PKG_REQUIRED_LIST
67         json-c
68         afb-daemon
69         ilmControl
70         ilmCommon
71 )
72
73 # You can also consider to include libsystemd
74 # -----------------------------------
75 list (APPEND PKG_REQUIRED_LIST libsystemd>=222)
76
77 # Prefix path where will be installed the files
78 # Default: /usr/local (need root permission to write in)
79 # ------------------------------------------------------
80 #set(INSTALL_PREFIX /opt/AGL CACHE PATH "INSTALL PREFIX PATH")
81
82 # Customize link option
83 # -----------------------------
84 list (APPEND link_libraries -pthread)
85
86 # Compilation options definition
87 # Use CMake generator expressions to specify only for a specific language
88 # Values are prefilled with default options that is currently used.
89 # Either separate options with ";", or each options must be quoted separately
90 # DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED !
91 # ----------------------------------------------------------------------------
92 #set(COMPILE_OPTIONS
93 # -Wall
94 # -Wextra
95 # -Wconversion
96 # -Wno-unused-parameter
97 # -Wno-sign-compare
98 # -Wno-sign-conversion
99 # -Werror=maybe-uninitialized
100 # -Werror=implicit-function-declaration
101 # -ffunction-sections
102 # -fdata-sections
103 # -fPIC
104 # CACHE STRING "Compilation flags")
105 #set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.")
106 #set(CXX_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C++ language.")
107 #set(PROFILING_COMPILE_OPTIONS
108 # -g
109 # -O0
110 # -pg
111 # -Wp,-U_FORTIFY_SOURCE
112 # CACHE STRING "Compilation flags for PROFILING build type.")
113 #set(DEBUG_COMPILE_OPTIONS
114 # -g
115 # -ggdb
116 # CACHE STRING "Compilation flags for DEBUG build type.")
117 #set(COVERAGE_COMPILE_OPTIONS
118 # -g
119 # -O0
120 # --coverage
121 # CACHE STRING "Compilation flags for COVERAGE build type.")
122 #set(RELEASE_COMPILE_OPTIONS
123 # -O2
124 # -pipe
125 # -D_FORTIFY_SOURCE=2
126 # -fstack-protector-strong
127 # -Wformat -Wformat-security
128 # -Werror=format-security
129 # -feliminate-unused-debug-types
130 # -Wl,-O1
131 # -Wl,--hash-style=gnu
132 # -Wl,--as-needed
133 # -fstack-protector-strong
134 # -Wl,-z,relro,-z,now
135 # CACHE STRING "Compilation flags for RELEASE build type.")
136
137 # Location for config.xml.in template file.
138 #
139 # If you keep them commented then it will build with a default minimal widget
140 # template which is very simple and it is highly probable that it will not suit
141 # to your app.
142 # -----------------------------------------
143 set(WIDGET_CONFIG_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/conf.d/wgt/config.xml.in)
144
145 # Mandatory widget Mimetype specification of the main unit
146 # --------------------------------------------------------------------------
147 # Choose between :
148 #- text/html : HTML application,
149 #       content.src designates the home page of the application
150 #
151 #- application/vnd.agl.native : AGL compatible native,
152 #       content.src designates the relative path of the binary.
153 #
154 # - application/vnd.agl.service: AGL service, content.src is not used.
155 #
156 #- ***application/x-executable***: Native application,
157 #       content.src designates the relative path of the binary.
158 #       For such application, only security setup is made.
159 #
160 set(WIDGET_TYPE application/vnd.agl.service)
161
162 # Mandatory Widget entry point file of the main unit
163 # --------------------------------------------------------------
164 # This is the file that will be executed, loaded,
165 # at launch time by the application framework.
166 #
167 set(WIDGET_ENTRY_POINT lib/windowmanager-service.so)
168
169 # Optional dependencies order
170 # ---------------------------
171 #set(EXTRA_DEPENDENCIES_ORDER)
172
173 # Optional Extra global include path
174 # -----------------------------------
175 #set(EXTRA_INCLUDE_DIRS)
176
177 # Optional extra libraries
178 # -------------------------
179 #set(EXTRA_LINK_LIBRARIES)
180
181 # Optional force binding Linking flag
182 # ------------------------------------
183 # set(BINDINGS_LINK_FLAG LinkOptions )
184
185 # Optional force package prefix generation, like widget
186 # -----------------------------------------------------
187 # set(PKG_PREFIX DestinationPath)
188
189 # Optional Application Framework security token
190 # and port use for remote debugging.
191 #------------------------------------------------------------
192 set(AFB_TOKEN   ""     CACHE PATH "Default binder security token")
193 set(AFB_REMPORT "1234" CACHE PATH "Default binder listening port")
194
195 # Print a helper message when every thing is finished
196 # ----------------------------------------------------
197 set(CLOSING_MESSAGE "Typical binding launch: cd ${CMAKE_BINARY_DIR}/package \\&\\& afb-daemon --port=${AFB_REMPORT} --workdir=. --ldpaths=lib --roothttp=htdocs  --token=\"${AFB_TOKEN}\" --tracereq=common --verbose")
198 set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt")
199
200 # Optional schema validator about now only XML, LUA and JSON
201 # are supported
202 #------------------------------------------------------------
203 #set(LUA_CHECKER "luac" "-p" CACHE STRING "LUA compiler")
204 #set(XML_CHECKER "xmllint" CACHE STRING "XML linter")
205 #set(JSON_CHECKER "json_verify" CACHE STRING "JSON linter")
206
207 include(CMakeAfbTemplates)