[dali_2.1.24] 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-CanvasView.cpp
18   utc-Dali-CheckBoxButton.cpp
19   utc-Dali-ConfirmationPopup.cpp
20   utc-Dali-CubeTransitionEffect.cpp
21   utc-Dali-EffectsView.cpp
22   utc-Dali-FadeTransition.cpp
23   utc-Dali-FlexContainer.cpp
24   utc-Dali-FlexNode.cpp
25   utc-Dali-GaussianBlurView.cpp
26   utc-Dali-Image.cpp
27   utc-Dali-ImageView.cpp
28   utc-Dali-ImageVisual.cpp
29   utc-Dali-ImageUrl.cpp
30   utc-Dali-JsonParser.cpp
31   utc-Dali-KeyInputFocusManager.cpp
32   utc-Dali-PageTurnView.cpp
33   utc-Dali-Scene3dView.cpp
34   utc-Dali-ScrollBar.cpp
35   utc-Dali-ScrollView.cpp
36   utc-Dali-ShaderEffects.cpp
37   utc-Dali-ShadowView.cpp
38   utc-Dali-ScaleTransition.cpp
39   utc-Dali-SlideTransition.cpp
40   utc-Dali-Slider.cpp
41   utc-Dali-TableView.cpp
42   utc-Dali-TextEditor.cpp
43   utc-Dali-TextField.cpp
44   utc-Dali-TextLabel.cpp
45   utc-Dali-TextSelectionPopup.cpp
46   utc-Dali-TextSelectionPopupMirroringLTR.cpp
47   utc-Dali-TextSelectionPopupMirroringRTL.cpp
48   utc-Dali-TextureManager.cpp
49   utc-Dali-ToolBar.cpp
50   utc-Dali-Tooltip.cpp
51   utc-Dali-Transition.cpp
52   utc-Dali-TransitionData.cpp
53   utc-Dali-Button.cpp
54   utc-Dali-CameraView.cpp
55   utc-Dali-Control.cpp
56   utc-Dali-ControlImpl.cpp
57   utc-Dali-ItemLayout.cpp
58   utc-Dali-ItemView.cpp
59   utc-Dali-KeyboardFocusManager.cpp
60   utc-Dali-Magnifier.cpp
61   utc-Dali-NavigationView.cpp
62   utc-Dali-Popup.cpp
63   utc-Dali-ProgressBar.cpp
64   utc-Dali-PushButton.cpp
65   utc-Dali-RadioButton.cpp
66   utc-Dali-ToggleButton.cpp
67   utc-Dali-ScrollViewEffect.cpp
68   utc-Dali-SuperBlurView.cpp
69   utc-Dali-Toolkit.cpp
70   utc-Dali-Model3dView.cpp
71   utc-Dali-Visual.cpp
72   utc-Dali-VisualFactory.cpp
73   utc-Dali-ImageAtlas.cpp
74   utc-Dali-VideoView.cpp
75   utc-Dali-WebView.cpp
76   utc-Dali-AsyncImageLoader.cpp
77   utc-Dali-SyncImageLoader.cpp
78   utc-Dali-ControlWrapper.cpp
79   utc-Dali-DragAndDropDetector.cpp
80   utc-Dali-NPatchUtilities.cpp
81   utc-Dali-GlView.cpp
82   utc-Dali-GlViewDirectRendering.cpp
83 )
84
85 # List of test harness files (Won't get parsed for test cases)
86 SET(TEST_HARNESS_SOURCES
87   dali-toolkit-test-utils/toolkit-adaptor.cpp
88   dali-toolkit-test-utils/toolkit-application.cpp
89   dali-toolkit-test-utils/toolkit-canvas-renderer.cpp
90   dali-toolkit-test-utils/toolkit-clipboard.cpp
91   dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
92   dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
93   dali-toolkit-test-utils/toolkit-environment-variable.cpp
94   dali-toolkit-test-utils/toolkit-input-method-context.cpp
95   dali-toolkit-test-utils/toolkit-input-method-options.cpp
96   dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
97   dali-toolkit-test-utils/toolkit-orientation.cpp
98   dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
99   dali-toolkit-test-utils/toolkit-style-monitor.cpp
100   dali-toolkit-test-utils/toolkit-test-application.cpp
101   dali-toolkit-test-utils/toolkit-timer.cpp
102   dali-toolkit-test-utils/toolkit-trigger-event-factory.cpp
103   dali-toolkit-test-utils/toolkit-tts-player.cpp
104   dali-toolkit-test-utils/toolkit-native-image-source.cpp
105   dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
106   dali-toolkit-test-utils/toolkit-vector-image-renderer.cpp
107   dali-toolkit-test-utils/toolkit-video-player.cpp
108   dali-toolkit-test-utils/toolkit-web-engine.cpp
109   dali-toolkit-test-utils/toolkit-window.cpp
110   dali-toolkit-test-utils/toolkit-scene-holder.cpp
111   dali-toolkit-test-utils/dali-test-suite-utils.cpp
112   dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
113   dali-toolkit-test-utils/dummy-control.cpp
114   dali-toolkit-test-utils/mesh-builder.cpp
115   dali-toolkit-test-utils/test-actor-utils.cpp
116   dali-toolkit-test-utils/test-animation-data.cpp
117   dali-toolkit-test-utils/test-application.cpp
118   dali-toolkit-test-utils/test-button.cpp
119   dali-toolkit-test-utils/test-encoded-image-buffer.cpp
120   dali-toolkit-test-utils/test-harness.cpp
121   dali-toolkit-test-utils/test-gesture-generator.cpp
122   dali-toolkit-test-utils/test-gl-abstraction.cpp
123   dali-toolkit-test-utils/test-graphics-sync-impl.cpp
124   dali-toolkit-test-utils/test-graphics-sync-object.cpp
125   dali-toolkit-test-utils/test-graphics-buffer.cpp
126   dali-toolkit-test-utils/test-graphics-command-buffer.cpp
127   dali-toolkit-test-utils/test-graphics-controller.cpp
128   dali-toolkit-test-utils/test-graphics-framebuffer.cpp
129   dali-toolkit-test-utils/test-graphics-texture.cpp
130   dali-toolkit-test-utils/test-graphics-pipeline.cpp
131   dali-toolkit-test-utils/test-graphics-program.cpp
132   dali-toolkit-test-utils/test-graphics-reflection.cpp
133   dali-toolkit-test-utils/test-graphics-sampler.cpp
134   dali-toolkit-test-utils/test-graphics-shader.cpp
135   dali-toolkit-test-utils/test-platform-abstraction.cpp
136   dali-toolkit-test-utils/test-render-controller.cpp
137   dali-toolkit-test-utils/test-trace-call-stack.cpp
138   dali-toolkit-test-utils/test-native-image.cpp
139   test-text-geometry-utils.cpp
140 )
141
142 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
143   dali2-core
144   dali2-adaptor
145   dali2-toolkit
146 )
147
148 ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED)
149 ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
150
151 ADD_DEFINITIONS(-DTEST_RESOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/../../resources\" )
152
153 FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
154     SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
155 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
156
157 INCLUDE_DIRECTORIES(
158     ../../../
159     ${${CAPI_LIB}_INCLUDE_DIRS}
160     dali-toolkit-test-utils
161 )
162
163 ADD_CUSTOM_COMMAND(
164   COMMAND ${SCRIPT_DIR}/tcheadgen.sh ${EXEC_NAME}.h ${TC_SOURCES}
165   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
166   OUTPUT ${EXEC_NAME}.h
167   COMMENT "Generating test tables"
168   )
169
170 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.h ${EXEC_NAME}.cpp ${TC_SOURCES} ${TEST_HARNESS_SOURCES})
171 TARGET_LINK_LIBRARIES(${EXEC_NAME}
172     ${${CAPI_LIB}_LIBRARIES}
173     -lpthread --coverage
174 )
175
176 INSTALL(PROGRAMS ${EXEC_NAME}
177     DESTINATION ${BIN_DIR}/${EXEC_NAME}
178 )