on cde4ee6 help sign in
unity8/tests/plugins/Unity/CMakeLists.txt
40 lines 1.3 kB history raw
1add_subdirectory(Indicators)
3pkg_check_modules(UNITYCORE REQUIRED unity-core-6.0)
4pkg_check_modules(LIBUNITYPROTO REQUIRED unity-protocol-private)
6include_directories(
7 ${Unity-qml_SOURCE_DIR}
8 ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Unity
9 ${CMAKE_CURRENT_BINARY_DIR}
10 ${LIBUNITYPROTO_INCLUDE_DIRS}
11 ${UNITYCORE_INCLUDE_DIRS}
12 )
14macro(run_tests)
15 set(_test_list "")
16 foreach(_test ${ARGN})
17 set(testCommand
18 ${CMAKE_CURRENT_BINARY_DIR}/${_test}Exec
19 -o ${CMAKE_BINARY_DIR}/${_test}.xml,xunitxml
20 -o -,txt)
21 add_test(NAME test${CLASSNAME}${_test} COMMAND ${testCommand})
22 add_custom_target(${_test} ${testCommand})
23 add_executable(${_test}Exec ${_test}.cpp previewbindingstest.cpp)
24 qt5_use_modules(${_test}Exec Test Core Qml)
25 set_tests_properties(test${CLASSNAME}${_test}
26 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Unity:${LIBUNITYPROTO_LIBRARY_DIRS}")
28 target_link_libraries(${_test}Exec
29 Unity-qml
30 ${UNITYCORE_LDFLAGS}
31 ${LIBUNITYPROTO_LDFLAGS}
32 )
34 set(_test_list "${_test_list};${_test}")
35 endforeach()
36endmacro(run_tests)
38run_tests(
39 previewbindingstest
40 )