2 # Copyright (C) 2017 Mentor Graphics Development (Deutschland) GmbH
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 wlproto(IVI_CON ivi-controller)
19 include(FindPkgConfig)
20 pkg_check_modules(AFB REQUIRED afb-daemon)
21 pkg_check_modules(SD REQUIRED libsystemd>=222)
23 # We do not want a prefix for our module
24 set(CMAKE_SHARED_MODULE_PREFIX "")
27 OUTPUT afb_binding_api.hpp afb_binding_glue.inl
28 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../generate-binding-glue.py
29 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/../generate-binding-glue.py)
31 add_library(winman MODULE
54 add_executable(redraw_fixer
63 target_include_directories(winman
70 target_link_libraries(redraw_fixer
74 target_link_libraries(winman
80 target_compile_definitions(winman
83 # We do not want source location of messages
84 AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS
85 WINMAN_VERSION_STRING="${PACKAGE_VERSION}"
86 _GNU_SOURCE) # XXX should I define this here?!
88 target_compile_definitions(redraw_fixer
90 DO_NOT_USE_AFB # override log* AFB macros
93 if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
94 target_compile_definitions(winman
97 target_compile_definitions(redraw_fixer
102 target_compile_options(winman
104 -Wall -Wextra -Wno-unused-parameter -Wno-comment)
106 set_target_properties(winman
108 # INTERPROCEDURAL_OPTIMIZATION ON
112 CXX_STANDARD_REQUIRED ON
116 C_STANDARD_REQUIRED ON
118 LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../export.map")
121 set_target_properties(winman
123 LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../export.map -lc++")
124 set_target_properties(redraw_fixer
129 if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")
130 target_compile_options(winman
132 -fsanitize=${SANITIZER_MODE} -g -fno-omit-frame-pointer)
133 set_target_properties(winman
135 LINK_FLAGS "-fsanitize=${SANITIZER_MODE} -g")