2008-11-04 00:08:39 +01:00
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
2013-06-19 02:06:55 +02:00
|
|
|
include(ECMMarkAsTest)
|
|
|
|
|
2013-03-05 14:43:14 +01:00
|
|
|
find_package(KCoreAddons REQUIRED)
|
|
|
|
|
2013-06-19 02:06:55 +02:00
|
|
|
# add_definitions( -DKDESRCDIR=${CMAKE_CURRENT_SOURCE_DIR} )
|
|
|
|
|
2008-11-04 00:08:39 +01:00
|
|
|
MACRO(PLASMA_UNIT_TESTS)
|
|
|
|
FOREACH(_testname ${ARGN})
|
2013-06-19 02:06:55 +02:00
|
|
|
add_executable(${_testname} ${_testname}.cpp)
|
2011-03-25 16:33:11 +01:00
|
|
|
target_link_libraries(${_testname} ${QT_QTTEST_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY}
|
2013-10-16 00:47:47 +02:00
|
|
|
Plasma KF5::KArchive KF5::KCoreAddons
|
2013-08-20 07:47:09 +02:00
|
|
|
KF5::KConfigGui
|
2013-09-12 01:31:37 +02:00
|
|
|
KF5::KI18n
|
2013-10-04 19:18:34 +02:00
|
|
|
KF5::KIOCore
|
2013-09-12 01:31:37 +02:00
|
|
|
KF5::KService)
|
2011-03-25 16:33:11 +01:00
|
|
|
if(QT_QTOPENGL_FOUND)
|
|
|
|
target_link_libraries(${_testname} ${QT_QTOPENGL_LIBRARY})
|
|
|
|
endif(QT_QTOPENGL_FOUND)
|
2013-06-19 02:06:55 +02:00
|
|
|
add_test(plasma-${_testname} ${_testname})
|
|
|
|
ecm_mark_as_test(${_testname})
|
2008-11-04 00:08:39 +01:00
|
|
|
ENDFOREACH(_testname)
|
|
|
|
ENDMACRO(PLASMA_UNIT_TESTS)
|
|
|
|
|
|
|
|
PLASMA_UNIT_TESTS(
|
2011-05-26 15:13:15 +02:00
|
|
|
configloadertest
|
2008-11-04 00:08:39 +01:00
|
|
|
packagestructuretest
|
2013-09-12 01:31:37 +02:00
|
|
|
pluginloadertest
|
2013-02-15 16:31:26 +01:00
|
|
|
# plasmoidpackagetest
|
2013-10-08 17:37:15 +02:00
|
|
|
#runnercontexttest
|
2008-11-04 00:08:39 +01:00
|
|
|
)
|
2011-04-28 15:19:42 +02:00
|
|
|
|
2013-06-19 02:06:55 +02:00
|
|
|
add_executable(storagetest storagetest.cpp ../private/storage.cpp ../private/storagethread.cpp)
|
2013-10-16 00:47:47 +02:00
|
|
|
target_link_libraries(storagetest ${QT_QTTEST_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTSQL_LIBRARY} KF5::KIOCore Plasma KF5::KCoreAddons )
|
2013-06-19 02:06:55 +02:00
|
|
|
add_test(plasma-storagetest storagetest)
|
|
|
|
ecm_mark_as_test(plasma-storagetest)
|
|
|
|
|
2011-04-28 15:19:42 +02:00
|
|
|
if(QT_QTOPENGL_FOUND)
|
2013-06-19 02:06:55 +02:00
|
|
|
target_link_libraries(storagetest ${QT_QTOPENGL_LIBRARY})
|
2011-04-28 15:19:42 +02:00
|
|
|
endif(QT_QTOPENGL_FOUND)
|
|
|
|
|
2009-10-01 08:50:37 +02:00
|
|
|
if(QCA2_FOUND)
|
2013-02-15 16:31:26 +01:00
|
|
|
# target_link_libraries(plasmoidpackagetest ${QCA2_LIBRARIES})
|
2009-10-01 08:50:37 +02:00
|
|
|
endif(QCA2_FOUND)
|
2008-11-04 00:08:39 +01:00
|
|
|
|