2015-11-02 03:38:51 +02:00
|
|
|
include_directories(${KDE4_KPARTS_INCLUDES})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
|
|
|
set(kpartstest_SRCS
|
2015-09-04 13:06:11 +00:00
|
|
|
testmainwindow.cpp
|
|
|
|
parts.cpp
|
|
|
|
notepad.cpp
|
2014-11-13 01:04:59 +02:00
|
|
|
)
|
|
|
|
|
2015-09-05 05:16:46 +00:00
|
|
|
kde4_add_manual_test(kparts-kpartstest ${kpartstest_SRCS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
target_link_libraries(kparts-kpartstest ${KDE4_KPARTS_LIBS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
|
|
|
set(normalktmtest_SRCS
|
2015-09-04 13:06:11 +00:00
|
|
|
normalktm.cpp
|
|
|
|
parts.cpp
|
|
|
|
notepad.cpp
|
2014-11-13 01:04:59 +02:00
|
|
|
)
|
|
|
|
|
2015-09-05 05:16:46 +00:00
|
|
|
kde4_add_manual_test(kparts-normalktmtest ${normalktmtest_SRCS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
target_link_libraries(kparts-normalktmtest ${KDE4_KPARTS_LIBS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
2015-11-02 19:10:29 +02:00
|
|
|
kde4_add_manual_test(kparts-partviewer partviewer.cpp)
|
2015-09-05 05:16:46 +00:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
target_link_libraries(kparts-partviewer ${KDE4_KPARTS_LIBS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### test prog for "open or save question" ###############
|
|
|
|
|
2015-09-05 05:16:46 +00:00
|
|
|
kde4_add_manual_test(kparts-openorsavequestion openorsavequestion.cpp)
|
2015-11-02 19:10:29 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
target_link_libraries(kparts-openorsavequestion ${KDE4_KPARTS_LIBS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
2015-11-02 19:10:29 +02:00
|
|
|
kde4_add_plugin(spellcheckplugin plugin_spellcheck.cpp)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
target_link_libraries(spellcheckplugin ${KDE4_KPARTS_LIBS})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
install(TARGETS spellcheckplugin DESTINATION ${PLUGIN_INSTALL_DIR})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
2015-11-02 19:10:29 +02:00
|
|
|
kde4_add_plugin(notepadpart notepad.cpp)
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
target_link_libraries(notepadpart ${KDE4_KPARTS_LIBS})
|
2015-09-05 05:16:46 +00:00
|
|
|
|
|
|
|
target_compile_definitions(notepadpart PRIVATE -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/")
|
2014-11-13 01:04:59 +02:00
|
|
|
|
2015-11-02 03:38:51 +02:00
|
|
|
install(TARGETS notepadpart DESTINATION ${PLUGIN_INSTALL_DIR})
|
2014-11-13 01:04:59 +02:00
|
|
|
|
|
|
|
########### unit tests ###############
|
|
|
|
|
|
|
|
MACRO(KPARTS_UNIT_TESTS)
|
2015-09-04 13:06:11 +00:00
|
|
|
FOREACH(_testname ${ARGN})
|
|
|
|
kde4_add_test(kparts-${_testname} ${_testname}.cpp)
|
|
|
|
target_link_libraries(kparts-${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY})
|
|
|
|
ENDFOREACH(_testname)
|
2014-11-13 01:04:59 +02:00
|
|
|
ENDMACRO(KPARTS_UNIT_TESTS)
|
|
|
|
MACRO(KPARTS_EXECUTABLE_TESTS)
|
2015-09-04 13:06:11 +00:00
|
|
|
FOREACH(_testname ${ARGN})
|
2015-09-05 05:16:46 +00:00
|
|
|
kde4_add_manual_test(kparts-${_testname} ${_testname}.cpp)
|
2015-09-04 13:06:11 +00:00
|
|
|
target_link_libraries(kparts-${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY})
|
|
|
|
ENDFOREACH(_testname)
|
2014-11-13 01:04:59 +02:00
|
|
|
ENDMACRO(KPARTS_EXECUTABLE_TESTS)
|
|
|
|
|
2015-09-05 05:16:46 +00:00
|
|
|
KPARTS_UNIT_TESTS(
|
|
|
|
parttest
|
|
|
|
openorsavequestion_unittest
|
2014-11-13 01:04:59 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
########### install files ###############
|
|
|
|
|
|
|
|
# Normally this would be needed. For the test programs we can avoid that, see addResourceDir.
|
|
|
|
#install( FILES notepadpart.rc DESTINATION ${DATA_INSTALL_DIR}/notepadpart )
|
|
|
|
#install( FILES partviewer_shell.rc DESTINATION ${DATA_INSTALL_DIR}/partviewer )
|
|
|
|
#install( FILES kpartstest_shell.rc DESTINATION ${DATA_INSTALL_DIR}/kpartstest )
|
|
|
|
#install( FILES kpartstest_part1.rc DESTINATION ${DATA_INSTALL_DIR}/kpartstestpart )
|
|
|
|
|
|
|
|
# To test plugins without installing them, try "ln -s kpartplugins <srcdir>"
|
|
|
|
#install( FILES plugin_foobar.rc plugin_spellcheck.rc DESTINATION ${DATA_INSTALL_DIR}/notepadpart/kpartplugins )
|