Merge "(AutomatedTests) Ensure warnings are shown as errors" into devel/master
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-platform-abstraction / CMakeLists.txt
1 SET(PKG_NAME "dali-platform-abstraction")
2
3 SET(EXEC_NAME "tct-${PKG_NAME}-core")
4 SET(RPM_NAME "core-${PKG_NAME}-tests")
5
6 SET(CAPI_LIB "dali-platform-abstraction")
7
8 SET(TC_SOURCES
9     utc-image-loading-load-completion.cpp
10     utc-image-loading-cancel-all-loads.cpp
11     utc-image-loading-cancel-some-loads.cpp
12 )
13
14 LIST(APPEND TC_SOURCES
15     resource-collector.cpp
16     ../dali-adaptor/dali-test-suite-utils/test-harness.cpp
17     ../dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp
18     tct-dali-platform-abstraction-core.cpp
19     utc-image-loading-common.cpp
20 )
21
22 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
23     dali-core
24     dali
25 )
26
27 SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -O0 -ggdb --coverage -Wall -Werror" )
28
29 # Shouldn't have to do this!
30 # But CMake's new auto-escape quote policy doesn't work right.
31 CMAKE_POLICY(SET CMP0005 OLD)
32 ADD_DEFINITIONS(-DTEST_IMAGE_DIR=\"\\\"${CMAKE_CURRENT_SOURCE_DIR}/../../images\\\"\" )
33
34 FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
35     SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
36 ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
37
38 INCLUDE_DIRECTORIES(
39     ../../../
40     ../../../adaptors/tizen
41     ../../../platform-abstractions/tizen
42     ${${CAPI_LIB}_INCLUDE_DIRS}
43     ../dali-adaptor/dali-test-suite-utils
44     /usr/include/freetype2
45 )
46
47 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
48 TARGET_LINK_LIBRARIES(${EXEC_NAME}
49     ${${CAPI_LIB}_LIBRARIES}
50 )
51
52 INSTALL(PROGRAMS ${EXEC_NAME}
53     DESTINATION ${BIN_DIR}/${EXEC_NAME}
54 )