62e5ee952d158b5fec741838e73767de98d39e9d
[apps/agl-service-windowmanager-2017.git] / src / policy_manager / CMakeLists.txt
1 #
2 # Copyright (c) 2017 TOYOTA MOTOR CORPORATION
3 #
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
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16
17 include(FindPkgConfig)
18
19 # We do not want a prefix for our module
20 set(CMAKE_SHARED_MODULE_PREFIX "")
21
22 set(TARGETS_PM lib${PLUGIN_PM})
23
24 add_library(${TARGETS_PM} MODULE
25    policy_manager.cpp
26 )
27
28 target_include_directories(${TARGETS_PM}
29     PRIVATE
30         ../../include
31         ../
32         ./
33         ./stm/${USE_STM_NAME}/src/include
34 )
35
36 target_link_libraries(${TARGETS_PM}
37     PRIVATE
38         ${CMAKE_BINARY_DIR}/src/${PLUGIN_PM}/stm/${USE_STM_NAME}/src/libstm.so
39 )
40
41 target_compile_definitions(${TARGETS_PM}
42     PRIVATE
43         _GNU_SOURCE
44 )
45
46 target_compile_options(${TARGETS_PM}
47     PRIVATE
48         -Wall -Wextra -Wno-unused-parameter -Wno-comment)
49
50 set_target_properties(${TARGETS_PM}
51     PROPERTIES
52         CXX_EXTENSIONS OFF
53         CXX_STANDARD 14
54         CXX_STANDARD_REQUIRED ON
55
56         C_EXTENSIONS OFF
57         C_STANDARD 99
58         C_STANDARD_REQUIRED ON
59 )
60
61 install(
62    TARGETS ${TARGET_PM}
63    DESTINATION ${CMAKE_INSTALL_LIBDIR}
64    COMPONENT "runtime"
65 )