Merge "Ensured ImageView requests inside ResourceReady signal handler are queued...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-third-party / CMakeLists.txt
1 SET(PKG_NAME "dali-toolkit-third-party")
2
3 SET(EXEC_NAME "tct-${PKG_NAME}-core")
4 SET(RPM_NAME "core-${PKG_NAME}-tests")
5
6 SET(CAPI_LIB "dali-toolkit-third-party")
7
8 # List of test case sources (Only these get parsed for test cases)
9 SET(TC_SOURCES
10  utc-Dali-Flexbox-Layout.cpp
11 )
12
13 # Append list of test harness files (Won't get parsed for test cases)
14 LIST(APPEND TC_SOURCES
15    ../dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp
16    ../dali-toolkit/dali-toolkit-test-utils/toolkit-application.cpp
17    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard.cpp
18    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
19    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
20    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
21    ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
22    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
23    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
24    ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
25    ../dali-toolkit/dali-toolkit-test-utils/toolkit-singleton-service.cpp
26    ../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
27    ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
28    ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
29    ../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
30    ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
31    ../dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
32    ../dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
33    ../dali-toolkit/dali-toolkit-test-utils/test-animation-data.cpp
34    ../dali-toolkit/dali-toolkit-test-utils/test-application.cpp
35    ../dali-toolkit/dali-toolkit-test-utils/test-button.cpp
36    ../dali-toolkit/dali-toolkit-test-utils/test-harness.cpp
37    ../dali-toolkit/dali-toolkit-test-utils/test-gesture-manager.cpp
38    ../dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp
39    ../dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
40    ../dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
41    ../dali-toolkit/dali-toolkit-test-utils/test-render-controller.cpp
42    ../dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
43    ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
44 )
45
46
47 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
48     dali-core
49     dali-adaptor
50     dali-toolkit
51 )
52
53 # Locate GTest
54 cmake_minimum_required(VERSION 2.6)
55 find_package(GTest REQUIRED)
56
57 #ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror )
58 # ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
59 # This works for a homogenous C++ project, but not for mixed C++/C project
60 # On CMake >= 3.3, could use
61 # ADD_COMPILE_OPTIONS( "$<$<COMPILE_LANGUAGE:CXX>:${${CAPI_LIB}_CFLAGS_OTHER}>" )
62 # However, we need to support CMake 2.8, so instead, fall back to setting the CXX_FLAGS directly:
63 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb --coverage -Wall -Werror" )
64 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER}" )
65
66 FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
67     SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
68 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
69
70 INCLUDE_DIRECTORIES(
71     ../../../
72     ../../../dali-toolkit/third-party
73     ${${CAPI_LIB}_INCLUDE_DIRS}
74     ../dali-toolkit/dali-toolkit-test-utils
75     ${GTEST_INCLUDE_DIRS}
76 )
77
78 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
79 TARGET_LINK_LIBRARIES(${EXEC_NAME}
80     ${${CAPI_LIB}_LIBRARIES}
81     -lpthread --coverage
82     ${GTEST_LIBRARIES}
83 )
84
85 INSTALL(PROGRAMS ${EXEC_NAME}
86     DESTINATION ${BIN_DIR}/${EXEC_NAME}
87 )