[dali_2.0.15] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / CMakeLists.txt
1 SET(PKG_NAME "dali-toolkit")
2
3 SET(EXEC_NAME "tct-${PKG_NAME}-core")
4 SET(RPM_NAME "core-${PKG_NAME}-tests")
5
6 SET(CAPI_LIB "dali-toolkit")
7
8 # List of test case sources (Only these get parsed for test cases)
9 SET(TC_SOURCES
10   utc-Dali-Alignment.cpp
11   utc-Dali-AnimatedImageVisual.cpp
12   utc-Dali-AnimatedVectorImageVisual.cpp
13   utc-Dali-ArcVisual.cpp
14   utc-Dali-BloomView.cpp
15   utc-Dali-BubbleEmitter.cpp
16   utc-Dali-Builder.cpp
17   utc-Dali-CheckBoxButton.cpp
18   utc-Dali-ConfirmationPopup.cpp
19   utc-Dali-CubeTransitionEffect.cpp
20   utc-Dali-EffectsView.cpp
21   utc-Dali-FlexContainer.cpp
22   utc-Dali-FlexNode.cpp
23   utc-Dali-GaussianBlurView.cpp
24   utc-Dali-Image.cpp
25   utc-Dali-ImageView.cpp
26   utc-Dali-ImageVisual.cpp
27   utc-Dali-JsonParser.cpp
28   utc-Dali-KeyInputFocusManager.cpp
29   utc-Dali-PageTurnView.cpp
30   utc-Dali-Scene3dView.cpp
31   utc-Dali-ScrollBar.cpp
32   utc-Dali-ScrollView.cpp
33   utc-Dali-ShaderEffects.cpp
34   utc-Dali-ShadowView.cpp
35   utc-Dali-Slider.cpp
36   utc-Dali-TableView.cpp
37   utc-Dali-TextEditor.cpp
38   utc-Dali-TextField.cpp
39   utc-Dali-TextLabel.cpp
40   utc-Dali-TextSelectionPopup.cpp
41   utc-Dali-TextSelectionPopupMirroringLTR.cpp
42   utc-Dali-TextSelectionPopupMirroringRTL.cpp
43   utc-Dali-TextureManager.cpp
44   utc-Dali-ToolBar.cpp
45   utc-Dali-Tooltip.cpp
46   utc-Dali-TransitionData.cpp
47   utc-Dali-Button.cpp
48   utc-Dali-Control.cpp
49   utc-Dali-ControlImpl.cpp
50   utc-Dali-ItemLayout.cpp
51   utc-Dali-ItemView.cpp
52   utc-Dali-KeyboardFocusManager.cpp
53   utc-Dali-Magnifier.cpp
54   utc-Dali-NavigationView.cpp
55   utc-Dali-Popup.cpp
56   utc-Dali-ProgressBar.cpp
57   utc-Dali-PushButton.cpp
58   utc-Dali-RadioButton.cpp
59   utc-Dali-ToggleButton.cpp
60   utc-Dali-ScrollViewEffect.cpp
61   utc-Dali-SuperBlurView.cpp
62   utc-Dali-Toolkit.cpp
63   utc-Dali-Model3dView.cpp
64   utc-Dali-Visual.cpp
65   utc-Dali-VisualFactory.cpp
66   utc-Dali-ImageAtlas.cpp
67   utc-Dali-VideoView.cpp
68   utc-Dali-WebView.cpp
69   utc-Dali-AsyncImageLoader.cpp
70   utc-Dali-SyncImageLoader.cpp
71   utc-Dali-ControlWrapper.cpp
72   utc-Dali-DragAndDropDetector.cpp
73   utc-Dali-NPatchUtilities.cpp
74 )
75
76 # List of test harness files (Won't get parsed for test cases)
77 SET(TEST_HARNESS_SOURCES
78   dali-toolkit-test-utils/toolkit-adaptor.cpp
79   dali-toolkit-test-utils/toolkit-application.cpp
80   dali-toolkit-test-utils/toolkit-clipboard.cpp
81   dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
82   dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
83   dali-toolkit-test-utils/toolkit-environment-variable.cpp
84   dali-toolkit-test-utils/toolkit-input-method-context.cpp
85   dali-toolkit-test-utils/toolkit-input-method-options.cpp
86   dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
87   dali-toolkit-test-utils/toolkit-orientation.cpp
88   dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
89   dali-toolkit-test-utils/toolkit-style-monitor.cpp
90   dali-toolkit-test-utils/toolkit-test-application.cpp
91   dali-toolkit-test-utils/toolkit-timer.cpp
92   dali-toolkit-test-utils/toolkit-trigger-event-factory.cpp
93   dali-toolkit-test-utils/toolkit-tts-player.cpp
94   dali-toolkit-test-utils/toolkit-native-image-source.cpp
95   dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
96   dali-toolkit-test-utils/toolkit-vector-image-renderer.cpp
97   dali-toolkit-test-utils/toolkit-video-player.cpp
98   dali-toolkit-test-utils/toolkit-web-engine.cpp
99   dali-toolkit-test-utils/toolkit-window.cpp
100   dali-toolkit-test-utils/toolkit-scene-holder.cpp
101   dali-toolkit-test-utils/dali-test-suite-utils.cpp
102   dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
103   dali-toolkit-test-utils/dummy-control.cpp
104   dali-toolkit-test-utils/mesh-builder.cpp
105   dali-toolkit-test-utils/test-actor-utils.cpp
106   dali-toolkit-test-utils/test-animation-data.cpp
107   dali-toolkit-test-utils/test-application.cpp
108   dali-toolkit-test-utils/test-button.cpp
109   dali-toolkit-test-utils/test-harness.cpp
110   dali-toolkit-test-utils/test-gesture-generator.cpp
111   dali-toolkit-test-utils/test-gl-abstraction.cpp
112   dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
113   dali-toolkit-test-utils/test-platform-abstraction.cpp
114   dali-toolkit-test-utils/test-render-controller.cpp
115   dali-toolkit-test-utils/test-trace-call-stack.cpp
116   dali-toolkit-test-utils/test-native-image.cpp
117 )
118
119 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
120   dali2-core
121   dali2-adaptor
122   dali2-toolkit
123 )
124
125 ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED)
126 ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
127
128 ADD_DEFINITIONS(-DTEST_RESOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/../../resources\" )
129
130 FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
131     SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
132 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
133
134 INCLUDE_DIRECTORIES(
135     ../../../
136     ${${CAPI_LIB}_INCLUDE_DIRS}
137     dali-toolkit-test-utils
138 )
139
140 ADD_CUSTOM_COMMAND(
141   COMMAND ${SCRIPT_DIR}/tcheadgen.sh ${EXEC_NAME}.h ${TC_SOURCES}
142   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
143   OUTPUT ${EXEC_NAME}.h
144   COMMENT "Generating test tables"
145   )
146
147 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.h ${EXEC_NAME}.cpp ${TC_SOURCES} ${TEST_HARNESS_SOURCES})
148 TARGET_LINK_LIBRARIES(${EXEC_NAME}
149     ${${CAPI_LIB}_LIBRARIES}
150     -lpthread --coverage
151 )
152
153 INSTALL(PROGRAMS ${EXEC_NAME}
154     DESTINATION ${BIN_DIR}/${EXEC_NAME}
155 )