Fix debug message
[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   windowmanager-client.cpp
36   applist.cpp
37   request.cpp
38 )
39
40 target_include_directories(${TARGET_TEST}
41     PRIVATE
42         ${CMAKE_THREAD_LIBS_INIT}
43         ${AFB_INCLUDE_DIRS}
44         ${GT_INCLUDE_DIRS}
45         ../include
46         ../src)
47
48 target_link_libraries(${TARGET_TEST}
49     PRIVATE
50     ${AFB_LIBRARIES}
51     ${GT_LIBRARIES}
52     pthread
53 )
54
55 set_target_properties(${TARGET_TEST}
56     PROPERTIES
57     # INTERPROCEDURAL_OPTIMIZATION ON
58
59         CXX_EXTENSIONS OFF
60         CXX_STANDARD 14
61         CXX_STANDARD_REQUIRED ON
62
63         C_EXTENSIONS OFF
64         C_STANDARD 99
65         C_STANDARD_REQUIRED ON
66 )