Renamed KeyEvent enum values to comply with coding standards.
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-internal / CMakeLists.txt
1 SET(PKG_NAME "dali-toolkit-internal")
2
3 SET(EXEC_NAME "tct-${PKG_NAME}-core")
4 SET(RPM_NAME "core-${PKG_NAME}-tests")
5
6 SET(CAPI_LIB "dali-toolkit-internal")
7
8 # List of test case sources (Only these get parsed for test cases)
9 SET(TC_SOURCES
10  utc-Dali-AddOns.cpp
11  utc-Dali-BidirectionalSupport.cpp
12  utc-Dali-ColorConversion.cpp
13  utc-Dali-Control-internal.cpp
14  utc-Dali-DebugRendering.cpp
15  utc-Dali-FeedbackStyle.cpp
16  utc-Dali-ItemView-internal.cpp
17  utc-Dali-LogicalModel.cpp
18  utc-Dali-PropertyHelper.cpp
19  utc-Dali-Text-CharacterSetConversion.cpp
20  utc-Dali-Text-Circular.cpp
21  utc-Dali-Text-Controller.cpp
22  utc-Dali-Text-Cursor.cpp
23  utc-Dali-Text-Layout.cpp
24  utc-Dali-Text-Markup.cpp
25  utc-Dali-Text-MultiLanguage.cpp
26  utc-Dali-Text-Segmentation.cpp
27  utc-Dali-Text-Shaping.cpp
28  utc-Dali-Text-Typesetter.cpp
29  utc-Dali-Text-ViewModel.cpp
30  utc-Dali-TextField-internal.cpp
31  utc-Dali-TextSelectionPopup-internal.cpp
32  utc-Dali-TextureManager.cpp
33  utc-Dali-Visuals-internal.cpp
34  utc-Dali-VisualModel.cpp
35  utc-Dali-VisualUrl.cpp
36 )
37
38 # Append list of test harness files (Won't get parsed for test cases)
39 LIST(APPEND TC_SOURCES
40    ../dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
41    ../dali-toolkit/dali-toolkit-test-utils/toolkit-accessibility-adaptor.cpp
42    ../dali-toolkit/dali-toolkit-test-utils/toolkit-application.cpp
43    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard.cpp
44    ../dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.cpp
45    ../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
46    ../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
47    ../dali-toolkit/dali-toolkit-test-utils/toolkit-feedback-player.cpp
48    ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
49    ../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-options.cpp
50    ../dali-toolkit/dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
51    ../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
52    ../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
53    ../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
54    ../dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.cpp
55    ../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
56    ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
57    ../dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
58    ../dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
59    ../dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder.cpp
60    ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
61    ../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
62    ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
63    ../dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
64    ../dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
65    ../dali-toolkit/dali-toolkit-test-utils/test-animation-data.cpp
66    ../dali-toolkit/dali-toolkit-test-utils/test-application.cpp
67    ../dali-toolkit/dali-toolkit-test-utils/test-button.cpp
68    ../dali-toolkit/dali-toolkit-test-utils/test-harness.cpp
69    ../dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp
70    ../dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
71    ../dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
72    ../dali-toolkit/dali-toolkit-test-utils/test-render-controller.cpp
73    ../dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
74    ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
75    dali-toolkit-test-utils/toolkit-text-utils.cpp
76    dali-toolkit-test-utils/dummy-visual.cpp
77    dali-toolkit-test-utils/test-addon-manager.cpp
78 )
79
80 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
81     dali2-core
82     dali2-adaptor
83     dali2-toolkit
84 )
85
86 ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED -fPIC )
87 ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
88
89 ADD_DEFINITIONS(-DTEST_RESOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/../../resources\" )
90 ADD_DEFINITIONS(-DDALI_ADDONS_PATH=\"${CMAKE_CURRENT_BINARY_DIR}\")
91
92 FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
93     SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
94 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
95
96 INCLUDE_DIRECTORIES(
97     ../../../
98     ${${CAPI_LIB}_INCLUDE_DIRS}
99     ../dali-toolkit/dali-toolkit-test-utils
100     dali-toolkit-test-utils
101 )
102
103 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
104 TARGET_LINK_LIBRARIES(${EXEC_NAME}
105     ${${CAPI_LIB}_LIBRARIES}
106     -lpthread --coverage -ldl
107 )
108
109 INSTALL(PROGRAMS ${EXEC_NAME}
110     DESTINATION ${BIN_DIR}/${EXEC_NAME}
111 )
112
113 # build addons
114 MESSAGE( STATUS "BINDIR: ${CMAKE_CURRENT_BINARY_DIR}")
115
116 FILE( GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR}/addons/*.cmake )
117
118 FOREACH( INFILE IN ITEMS ${FILES} )
119
120     INCLUDE( ${INFILE} )
121     MESSAGE( STATUS "Building ${INFILE}" )
122
123     ADD_LIBRARY( ${ADDON_NAME} SHARED ${ADDON_SOURCES} )
124
125     TARGET_INCLUDE_DIRECTORIES( ${ADDON_NAME} PUBLIC
126             ../../../
127             ${${CAPI_LIB}_INCLUDE_DIRS}
128             ../dali-toolkit/dali-toolkit-test-utils
129             dali-toolkit-test-utils)
130
131     TARGET_LINK_LIBRARIES(${ADDON_NAME}
132             ${CMAKE_CXX_LINK_FLAGS}
133             ${${CAPI_LIB}_LIBRARIES}
134             -lpthread -ldl --coverage
135             )
136
137     INSTALL( TARGETS ${ADDON_NAME} DESTINATION ${BIN_DIR} )
138
139     SET( ADDON_LIST "lib${ADDON_NAME}.so
140 ${ADDON_LIST}")
141 ENDFOREACH()
142
143 # store AddOns list
144 FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/addons.txt "${ADDON_LIST}" )