1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
set(TEST_SRCS
main.cpp
tst_action.cpp
tst_previewaction.cpp
tst_previewrangeparameter.cpp
# tst_menuitem.cpp
tst_actioncontext.cpp
tst_actionmanager.cpp
)
set(testCommand dbus-test-runner -t ${CMAKE_CURRENT_BINARY_DIR}/cpptest
-p -o -p ${CMAKE_BINARY_DIR}/cpptest.xml,xunitxml
-p -o -p -,txt)
pkg_search_module(GIO REQUIRED gio-2.0)
include_directories(${GIO_INCLUDE_DIRS})
add_executable(cpptest ${TEST_SRCS})
target_link_libraries(cpptest lomiri-action-qt${QT_VERSION_IN_LIBNAME} ${GIO_LIBRARIES})
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
target_link_libraries(cpptest Qt::Core Qt::Test)
add_test(NAME cpp COMMAND ${testCommand})
|