Use class not struct for WindowManager
[apps/agl-service-windowmanager.git] / test / 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 cmake_minimum_required(VERSION 2.8)
17
18 find_package(PkgConfig REQUIRED)
19 pkg_check_modules(AFB QUIET afb-daemon)
20 pkg_check_modules(GT REQUIRED gtest)
21
22 INCLUDE(FindThreads)
23 FIND_PACKAGE(Threads)
24
25 add_definitions(-DGTEST_ENABLED)
26
27 set(TARGET_TEST wmtest)
28 set(GTEST_ROOT /home/mitsunari/test/googletest/googletest)
29
30 include_directories(${GTEST_ROOT}/include/)
31
32 link_directories(${GTEST_ROOT}/build/)
33 add_executable(${TARGET_TEST}
34   test.cpp
35   wm_client.cpp
36   wm_error.cpp
37   applist.cpp
38   request.cpp
39 )
40
41 target_include_directories(${TARGET_TEST}
42     PRIVATE
43         ${CMAKE_THREAD_LIBS_INIT}
44         ${AFB_INCLUDE_DIRS}
45         ${GT_INCLUDE_DIRS}
46         ../include
47         ../src)
48
49 target_link_libraries(${TARGET_TEST}
50     PRIVATE
51     ${AFB_LIBRARIES}
52     ${GT_LIBRARIES}
53     pthread
54 )
55
56 set_target_properties(${TARGET_TEST}
57     PROPERTIES
58     # INTERPROCEDURAL_OPTIMIZATION ON
59
60         CXX_EXTENSIONS OFF
61         CXX_STANDARD 14
62         CXX_STANDARD_REQUIRED ON
63
64         C_EXTENSIONS OFF
65         C_STANDARD 99
66         C_STANDARD_REQUIRED ON
67 )