Commit 65ae3c28 authored by Christoph Cullmann's avatar Christoph Cullmann

Merge branch 'addons-cmake-cleanup' into 'master'

Further cleanup addons CMake scripts.

See merge request !3
parents 6f3e2231 58e19566
# minimal requirements # 3.1 is required for `target_sources`.
cmake_minimum_required (VERSION 3.0 FATAL_ERROR) cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
# Kate project # Kate project
project (kate) project (kate)
......
set(katebacktracebrowserplugin_PART_SRCS add_library(katebacktracebrowserplugin MODULE "")
katebacktracebrowser.cpp
btparser.cpp
btfileindexer.cpp
btdatabase.cpp
)
set(katebacktracebrowserplugin_PART_UI
btbrowserwidget.ui
btconfigwidget.ui
)
ki18n_wrap_ui(katebacktracebrowserplugin_PART_SRCS ${katebacktracebrowserplugin_PART_UI})
add_library(katebacktracebrowserplugin MODULE ${katebacktracebrowserplugin_PART_SRCS})
target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN="katebacktracebrowserplugin") target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN="katebacktracebrowserplugin")
target_link_libraries(katebacktracebrowserplugin PRIVATE KF5::TextEditor) target_link_libraries(katebacktracebrowserplugin PRIVATE KF5::TextEditor)
ki18n_wrap_ui(UI_SRCS btbrowserwidget.ui btconfigwidget.ui)
target_sources(katebacktracebrowserplugin PRIVATE ${UI_SRCS})
target_sources(
katebacktracebrowserplugin
PRIVATE
katebacktracebrowser.cpp
btparser.cpp
btfileindexer.cpp
btdatabase.cpp
)
kcoreaddons_desktop_to_json(katebacktracebrowserplugin katebacktracebrowserplugin.desktop) kcoreaddons_desktop_to_json(katebacktracebrowserplugin katebacktracebrowserplugin.desktop)
install(TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
......
...@@ -7,7 +7,7 @@ find_package(Qt5Test QUIET REQUIRED) ...@@ -7,7 +7,7 @@ find_package(Qt5Test QUIET REQUIRED)
target_link_libraries( target_link_libraries(
btbrowser_test btbrowser_test
PRIVATE PRIVATE
kdeinit_kate Qt5::Widgets
Qt5::Test Qt5::Test
) )
......
...@@ -5,17 +5,7 @@ if(NOT KF5IconThemes_FOUND) ...@@ -5,17 +5,7 @@ if(NOT KF5IconThemes_FOUND)
return() return()
endif() endif()
set(KATE_CLOSE_EXCEPT_PLUGIN_SOURCES add_library(katecloseexceptplugin MODULE "")
close_confirm_dialog.cpp
close_except_plugin.cpp
plugin.qrc
)
set(KATE_CLOSE_EXCEPT_PLUGIN_UI close_confirm_dialog.ui)
ki18n_wrap_ui(KATE_CLOSE_EXCEPT_PLUGIN_SOURCES ${KATE_CLOSE_EXCEPT_PLUGIN_UI})
add_library(katecloseexceptplugin MODULE ${KATE_CLOSE_EXCEPT_PLUGIN_SOURCES})
target_compile_definitions(katecloseexceptplugin PRIVATE TRANSLATION_DOMAIN="katecloseexceptplugin") target_compile_definitions(katecloseexceptplugin PRIVATE TRANSLATION_DOMAIN="katecloseexceptplugin")
target_link_libraries( target_link_libraries(
...@@ -25,5 +15,16 @@ target_link_libraries( ...@@ -25,5 +15,16 @@ target_link_libraries(
KF5::IconThemes KF5::IconThemes
) )
ki18n_wrap_ui(UI_SOURCES close_confirm_dialog.ui)
target_sources(katecloseexceptplugin PRIVATE ${UI_SOURCES})
target_sources(
katecloseexceptplugin
PRIVATE
close_confirm_dialog.cpp
close_except_plugin.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(katecloseexceptplugin katecloseexceptplugin.desktop) kcoreaddons_desktop_to_json(katecloseexceptplugin katecloseexceptplugin.desktop)
install(TARGETS katecloseexceptplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katecloseexceptplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
...@@ -5,14 +5,7 @@ if(NOT KF5KIO_FOUND) ...@@ -5,14 +5,7 @@ if(NOT KF5KIO_FOUND)
return() return()
endif() endif()
set(katefilebrowserplugin_PART_SRCS add_library(katefilebrowserplugin MODULE "")
katefilebrowserplugin.cpp
katefilebrowserconfig.cpp
katefilebrowser.cpp
katebookmarkhandler.cpp
)
add_library(katefilebrowserplugin MODULE ${katefilebrowserplugin_PART_SRCS})
target_compile_definitions(katefilebrowserplugin PRIVATE TRANSLATION_DOMAIN="katefilebrowserplugin") target_compile_definitions(katefilebrowserplugin PRIVATE TRANSLATION_DOMAIN="katefilebrowserplugin")
target_link_libraries( target_link_libraries(
...@@ -22,5 +15,14 @@ target_link_libraries( ...@@ -22,5 +15,14 @@ target_link_libraries(
KF5::KIOFileWidgets KF5::KIOFileWidgets
) )
target_sources(
katefilebrowserplugin
PRIVATE
katefilebrowserplugin.cpp
katefilebrowserconfig.cpp
katefilebrowser.cpp
katebookmarkhandler.cpp
)
kcoreaddons_desktop_to_json(katefilebrowserplugin katefilebrowserplugin.desktop) kcoreaddons_desktop_to_json(katefilebrowserplugin katefilebrowserplugin.desktop)
install(TARGETS katefilebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katefilebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
...@@ -5,42 +5,30 @@ if(NOT KF5GuiAddons_FOUND) ...@@ -5,42 +5,30 @@ if(NOT KF5GuiAddons_FOUND)
return() return()
endif() endif()
add_library(katefiletree STATIC "") add_library(katefiletree MODULE "")
set_target_properties(katefiletree PROPERTIES POSITION_INDEPENDENT_CODE TRUE) target_compile_definitions(katefiletree PRIVATE TRANSLATION_DOMAIN="katefiletree")
# PUBLIC so that `katefiletreeplugin` inherits these usage requirements.
target_compile_definitions(katefiletree PUBLIC TRANSLATION_DOMAIN="katefiletree")
target_link_libraries( target_link_libraries(
katefiletree katefiletree
PUBLIC PUBLIC
KF5::TextEditor KF5::TextEditor
KF5::GuiAddons KF5::GuiAddons
) )
target_sources( target_sources(
katefiletree katefiletree
PRIVATE PRIVATE
katefiletree.cpp katefiletree.cpp
katefiletreemodel.cpp katefiletreeconfigpage.cpp
katefiletreeproxymodel.cpp katefiletreemodel.cpp
plugin.qrc katefiletreeplugin.cpp
)
add_library(katefiletreeplugin MODULE "")
target_link_libraries(katefiletreeplugin PRIVATE katefiletree)
target_sources(
katefiletreeplugin
PRIVATE
katefiletreeplugin.cpp
katefiletreeconfigpage.cpp
katefiletreepluginsettings.cpp katefiletreepluginsettings.cpp
katefiletreeproxymodel.cpp
plugin.qrc plugin.qrc
) )
kcoreaddons_desktop_to_json(katefiletreeplugin katefiletreeplugin.desktop) kcoreaddons_desktop_to_json(katefiletree katefiletreeplugin.desktop)
install(TARGETS katefiletreeplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katefiletree DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
if(BUILD_TESTING) if(BUILD_TESTING)
add_subdirectory(autotests) add_subdirectory(autotests)
......
include(ECMMarkAsTest) include(ECMMarkAsTest)
add_executable(filetree_model_test "") add_executable(filetree_model_test "")
target_include_directories(filetree_model_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
find_package(Qt5Test QUIET REQUIRED) find_package(Qt5Test QUIET REQUIRED)
target_link_libraries( target_link_libraries(
filetree_model_test filetree_model_test
PRIVATE PRIVATE
katefiletree KF5::GuiAddons
KF5::TextEditor
Qt5::Test Qt5::Test
) )
target_sources( target_sources(
filetree_model_test filetree_model_test
PRIVATE PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../katefiletreemodel.cpp
filetree_model_test.cpp filetree_model_test.cpp
document_dummy.cpp document_dummy.cpp
) )
......
...@@ -3,21 +3,24 @@ if(WIN32) ...@@ -3,21 +3,24 @@ if(WIN32)
return() return()
endif() endif()
set(kategdbplugin_PART_SRCS add_library(kategdbplugin MODULE "")
plugin_kategdb.cpp
debugview.cpp
configview.cpp
ioview.cpp
localsview.cpp
advanced_settings.cpp
plugin.qrc
)
ki18n_wrap_ui(kategdbplugin_PART_SRCS advanced_settings.ui)
add_library(kategdbplugin MODULE ${kategdbplugin_PART_SRCS})
target_compile_definitions(kategdbplugin PRIVATE TRANSLATION_DOMAIN="kategdbplugin") target_compile_definitions(kategdbplugin PRIVATE TRANSLATION_DOMAIN="kategdbplugin")
target_link_libraries(kategdbplugin PRIVATE KF5::TextEditor) target_link_libraries(kategdbplugin PRIVATE KF5::TextEditor)
ki18n_wrap_ui(UI_SOURCES advanced_settings.ui)
target_sources(kategdbplugin PRIVATE ${UI_SOURCES})
target_sources(
kategdbplugin
PRIVATE
plugin_kategdb.cpp
debugview.cpp
configview.cpp
ioview.cpp
localsview.cpp
advanced_settings.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(kategdbplugin kategdbplugin.desktop) kcoreaddons_desktop_to_json(kategdbplugin kategdbplugin.desktop)
install(TARGETS kategdbplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS kategdbplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
include(ECMQtDeclareLoggingCategory) add_library(katectagsplugin MODULE "")
target_compile_definitions(katectagsplugin PRIVATE TRANSLATION_DOMAIN="kate-ctags-plugin")
target_link_libraries(katectagsplugin PRIVATE KF5::TextEditor)
set(ctagsplugin_SRC ki18n_wrap_ui(UI_SOURCES kate_ctags.ui CTagsGlobalConfig.ui)
readtags.c target_sources(katectagsplugin PRIVATE ${UI_SOURCES})
tags.cpp
ctagskinds.cpp
kate_ctags_view.cpp
kate_ctags_plugin.cpp
plugin.qrc
)
include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category( ecm_qt_declare_logging_category(
ctagsplugin_SRC DEBUG_SOURCES
HEADER kate_ctags_debug.h HEADER kate_ctags_debug.h
IDENTIFIER KTECTAGS IDENTIFIER KTECTAGS
CATEGORY_NAME "katectagsplugin" CATEGORY_NAME "katectagsplugin"
) )
target_sources(katectagsplugin PRIVATE ${DEBUG_SOURCES})
ki18n_wrap_ui(ctagsplugin_SRC kate_ctags.ui CTagsGlobalConfig.ui) target_sources(
katectagsplugin
add_library(katectagsplugin MODULE ${ctagsplugin_SRC}) PRIVATE
target_compile_definitions(katectagsplugin PRIVATE TRANSLATION_DOMAIN="kate-ctags-plugin") readtags.c
target_link_libraries(katectagsplugin PRIVATE KF5::TextEditor) tags.cpp
ctagskinds.cpp
kate_ctags_view.cpp
kate_ctags_plugin.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(katectagsplugin katectagsplugin.desktop) kcoreaddons_desktop_to_json(katectagsplugin katectagsplugin.desktop)
install(TARGETS katectagsplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katectagsplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
set(katebuild_SRCS add_library(katebuildplugin MODULE "")
plugin_katebuild.cpp
targets.cpp
TargetHtmlDelegate.cpp
TargetModel.cpp
UrlInserter.cpp
SelectTargetView.cpp
plugin.qrc
)
ki18n_wrap_ui(katebuild_SRCS build.ui SelectTargetUi.ui)
add_library(katebuildplugin MODULE ${katebuild_SRCS})
target_compile_definitions(katebuildplugin PRIVATE TRANSLATION_DOMAIN="katebuild-plugin") target_compile_definitions(katebuildplugin PRIVATE TRANSLATION_DOMAIN="katebuild-plugin")
target_link_libraries(katebuildplugin PRIVATE KF5::TextEditor) target_link_libraries(katebuildplugin PRIVATE KF5::TextEditor)
ki18n_wrap_ui(UI_SOURCES build.ui SelectTargetUi.ui)
target_sources(katebuildplugin PRIVATE ${UI_SOURCES})
target_sources(
katebuildplugin
PRIVATE
plugin_katebuild.cpp
targets.cpp
TargetHtmlDelegate.cpp
TargetModel.cpp
UrlInserter.cpp
SelectTargetView.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json (katebuildplugin katebuildplugin.desktop) kcoreaddons_desktop_to_json (katebuildplugin katebuildplugin.desktop)
install(TARGETS katebuildplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katebuildplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
...@@ -5,34 +5,37 @@ if(NOT KF5ItemModels_FOUND) ...@@ -5,34 +5,37 @@ if(NOT KF5ItemModels_FOUND)
return() return()
endif() endif()
set(lspclientplugin_SRCS add_library(lspclientplugin MODULE "")
lspclientcompletion.cpp target_compile_definitions(lspclientplugin PRIVATE TRANSLATION_DOMAIN="lspclient")
lspclientconfigpage.cpp
lspclienthover.cpp target_link_libraries(
lspclientplugin.cpp lspclientplugin
lspclientpluginview.cpp PRIVATE
lspclientserver.cpp KF5::ItemModels
lspclientservermanager.cpp KF5::TextEditor
lspclientsymbolview.cpp
plugin.qrc
) )
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category( ecm_qt_declare_logging_category(
lspclientplugin_debug_SRCS DEBUG_SOURCES
HEADER lspclient_debug.h HEADER lspclient_debug.h
IDENTIFIER LSPCLIENT IDENTIFIER LSPCLIENT
CATEGORY_NAME "katelspclientplugin" CATEGORY_NAME "katelspclientplugin"
) )
target_sources(lspclientplugin PRIVATE ${DEBUG_SOURCES})
add_library(lspclientplugin MODULE ${lspclientplugin_SRCS} ${lspclientplugin_debug_SRCS}) target_sources(
target_compile_definitions(lspclientplugin PRIVATE TRANSLATION_DOMAIN="lspclient") lspclientplugin
PRIVATE
target_link_libraries( lspclientcompletion.cpp
lspclientplugin lspclientconfigpage.cpp
PRIVATE lspclienthover.cpp
KF5::ItemModels lspclientplugin.cpp
KF5::TextEditor lspclientpluginview.cpp
lspclientserver.cpp
lspclientservermanager.cpp
lspclientsymbolview.cpp
plugin.qrc
) )
kcoreaddons_desktop_to_json(lspclientplugin lspclientplugin.desktop) kcoreaddons_desktop_to_json(lspclientplugin lspclientplugin.desktop)
......
...@@ -7,5 +7,5 @@ target_sources( ...@@ -7,5 +7,5 @@ target_sources(
PRIVATE PRIVATE
lsptestapp.cpp lsptestapp.cpp
../lspclientserver.cpp ../lspclientserver.cpp
${lspclientplugin_debug_SRCS} ${DEBUG_SOURCES}
) )
include(ECMQtDeclareLoggingCategory) add_library(ktexteditorpreviewplugin MODULE "")
target_compile_definitions(ktexteditorpreviewplugin PRIVATE TRANSLATION_DOMAIN="ktexteditorpreviewplugin")
set(ktexteditorpreviewplugin_SRCS target_link_libraries(ktexteditorpreviewplugin PRIVATE KF5::TextEditor)
ktexteditorpreviewplugin.cpp
ktexteditorpreviewview.cpp
previewwidget.cpp
kpartview.cpp
)
include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category( ecm_qt_declare_logging_category(
ktexteditorpreviewplugin_SRCS DEBUG_SOURCES
HEADER ktexteditorpreview_debug.h HEADER ktexteditorpreview_debug.h
IDENTIFIER KTEPREVIEW IDENTIFIER KTEPREVIEW
CATEGORY_NAME "ktexteditorpreviewplugin" CATEGORY_NAME "ktexteditorpreviewplugin"
) )
target_sources(ktexteditorpreviewplugin PRIVATE ${DEBUG_SOURCES})
add_library(ktexteditorpreviewplugin MODULE ${ktexteditorpreviewplugin_SRCS}) target_sources(
target_compile_definitions(ktexteditorpreviewplugin PRIVATE TRANSLATION_DOMAIN="ktexteditorpreviewplugin") ktexteditorpreviewplugin
target_link_libraries(ktexteditorpreviewplugin PRIVATE KF5::TextEditor) PRIVATE
ktexteditorpreviewplugin.cpp
ktexteditorpreviewview.cpp
previewwidget.cpp
kpartview.cpp
)
install(TARGETS ktexteditorpreviewplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor) install(TARGETS ktexteditorpreviewplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
...@@ -7,7 +7,7 @@ find_package(Qt5Test QUIET REQUIRED) ...@@ -7,7 +7,7 @@ find_package(Qt5Test QUIET REQUIRED)
target_link_libraries( target_link_libraries(
projectplugin_test projectplugin_test
PRIVATE PRIVATE
kdeinit_kate KF5::TextEditor
Qt5::Test Qt5::Test
) )
......
...@@ -5,18 +5,7 @@ if(NOT KF5IconThemes_FOUND) ...@@ -5,18 +5,7 @@ if(NOT KF5IconThemes_FOUND)
return() return()
endif() endif()
set(katereplicode_SRCS add_library(katereplicodeplugin MODULE "")
replicodeplugin.cpp
replicodeconfigpage.cpp
replicodeconfig.cpp
replicodesettings.cpp
replicodeview.cpp
plugin.qrc
)
ki18n_wrap_ui(katereplicode_SRCS config.ui)
add_library(katereplicodeplugin MODULE ${katereplicode_SRCS})
target_compile_definitions(katereplicodeplugin PRIVATE TRANSLATION_DOMAIN="kate-replicode-plugin") target_compile_definitions(katereplicodeplugin PRIVATE TRANSLATION_DOMAIN="kate-replicode-plugin")
target_link_libraries( target_link_libraries(
...@@ -26,5 +15,19 @@ target_link_libraries( ...@@ -26,5 +15,19 @@ target_link_libraries(
KF5::IconThemes KF5::IconThemes
) )
ki18n_wrap_ui(UI_SOURCES config.ui)
target_sources(katereplicodeplugin PRIVATE ${UI_SOURCES})
target_sources(
katereplicodeplugin
PRIVATE
replicodeplugin.cpp
replicodeconfigpage.cpp
replicodeconfig.cpp
replicodesettings.cpp
replicodeview.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(katereplicodeplugin katereplicodeplugin.desktop) kcoreaddons_desktop_to_json(katereplicodeplugin katereplicodeplugin.desktop)
install(TARGETS katereplicodeplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katereplicodeplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
add_library(kterustcompletionplugin MODULE ${kterustcompletion_SRCS}) add_library(kterustcompletionplugin MODULE "")
target_compile_definitions(kterustcompletionplugin PRIVATE TRANSLATION_DOMAIN="kterustcompletion") target_compile_definitions(kterustcompletionplugin PRIVATE TRANSLATION_DOMAIN="kterustcompletion")
target_link_libraries(kterustcompletionplugin PRIVATE KF5::TextEditor) target_link_libraries(kterustcompletionplugin PRIVATE KF5::TextEditor)
......
...@@ -5,19 +5,7 @@ if(NOT KF5ItemViews_FOUND) ...@@ -5,19 +5,7 @@ if(NOT KF5ItemViews_FOUND)
return() return()
endif() endif()
set(katesearchplugin_PART_SRCS add_library(katesearchplugin MODULE "")
plugin_search.cpp
search_open_files.cpp
SearchDiskFiles.cpp
FolderFilesList.cpp
replace_matches.cpp
htmldelegate.cpp
plugin.qrc
)
ki18n_wrap_ui(katesearchplugin_PART_SRCS search.ui results.ui)
add_library(katesearchplugin MODULE ${katesearchplugin_PART_SRCS})
target_compile_definitions(katesearchplugin PRIVATE TRANSLATION_DOMAIN="katesearch") target_compile_definitions(katesearchplugin PRIVATE TRANSLATION_DOMAIN="katesearch")
target_link_libraries( target_link_libraries(
...@@ -27,5 +15,20 @@ target_link_libraries( ...@@ -27,5 +15,20 @@ target_link_libraries(
KF5::TextEditor KF5::TextEditor
) )
ki18n_wrap_ui(UI_SOURCES search.ui results.ui)
target_sources(katesearchplugin PRIVATE ${UI_SOURCES})
target_sources(
katesearchplugin
PRIVATE
plugin_search.cpp
search_open_files.cpp
SearchDiskFiles.cpp
FolderFilesList.cpp
replace_matches.cpp
htmldelegate.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(katesearchplugin katesearch.desktop) kcoreaddons_desktop_to_json(katesearchplugin katesearch.desktop)
install(TARGETS katesearchplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katesearchplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
...@@ -8,7 +8,7 @@ if(NOT KF5Plasma_FOUND OR NOT Qt5Widgets_FOUND) ...@@ -8,7 +8,7 @@ if(NOT KF5Plasma_FOUND OR NOT Qt5Widgets_FOUND)
return() return()
endif() endif()
add_library(plasma_engine_katesessions MODULE ${plasma_engine_katesessions_SRCS}) add_library(plasma_engine_katesessions MODULE "")
target_compile_definitions(plasma_engine_katesessions PRIVATE TRANSLATION_DOMAIN="plasma_applet_org.kde.plasma.katesessions") target_compile_definitions(plasma_engine_katesessions PRIVATE TRANSLATION_DOMAIN="plasma_applet_org.kde.plasma.katesessions")
target_link_libraries( target_link_libraries(
......
...@@ -5,23 +5,7 @@ if(NOT KF5NewStuff_FOUND) ...@@ -5,23 +5,7 @@ if(NOT KF5NewStuff_FOUND)
return() return()
endif() endif()
set(katesnippetsplugin_PART_SRCS add_library(katesnippetsplugin MODULE "")
katesnippets.cpp
katesnippetglobal.cpp
snippetview.cpp
snippetstore.cpp
snippetrepository.cpp
snippetcompletionmodel.cpp
snippetcompletionitem.cpp
snippet.cpp
editrepository.cpp
editsnippet.cpp
plugin.qrc
)
ki18n_wrap_ui(katesnippetsplugin_PART_SRCS snippetview.ui editrepository.ui editsnippet.ui)
add_library(katesnippetsplugin MODULE ${katesnippetsplugin_PART_SRCS})
target_compile_definitions(katesnippetsplugin PRIVATE TRANSLATION_DOMAIN="katesnippetsplugin") target_compile_definitions(katesnippetsplugin PRIVATE TRANSLATION_DOMAIN="katesnippetsplugin")
target_link_libraries( target_link_libraries(
...@@ -31,5 +15,24 @@ target_link_libraries( ...@@ -31,5 +15,24 @@ target_link_libraries(
KF5::TextEditor KF5::TextEditor
) )
ki18n_wrap_ui(UI_SOURCES snippetview.ui editrepository.ui editsnippet.ui)
target_sources(katesnippetsplugin PRIVATE ${UI_SOURCES})
target_sources(
katesnippetsplugin
PRIVATE
katesnippets.cpp
katesnippetglobal.cpp
snippetview.cpp
snippetstore.cpp
snippetrepository.cpp
snippetcompletionmodel.cpp
snippetcompletionitem.cpp
snippet.cpp
editrepository.cpp
editsnippet.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(katesnippetsplugin katesnippetsplugin.desktop) kcoreaddons_desktop_to_json(katesnippetsplugin katesnippetsplugin.desktop)
install(TARGETS katesnippetsplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS katesnippetsplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
...@@ -7,7 +7,7 @@ find_package(Qt5Test QUIET REQUIRED) ...@@ -7,7 +7,7 @@ find_package(Qt5Test QUIET REQUIRED)
target_link_libraries( target_link_libraries(
tabswitcher_test tabswitcher_test
PRIVATE PRIVATE
kdeinit_kate KF5::TextEditor
Qt5::Test Qt5::Test
) )
......
set(textfilterplugin_PART_SRCS add_library(textfilterplugin MODULE "")
plugin_katetextfilter.cpp
plugin.qrc
)
ki18n_wrap_ui(textfilterplugin_PART_SRCS textfilterwidget.ui)
add_library(textfilterplugin MODULE ${textfilterplugin_PART_SRCS})
target_compile_definitions(textfilterplugin PRIVATE TRANSLATION_DOMAIN="katetextfilter") target_compile_definitions(textfilterplugin PRIVATE TRANSLATION_DOMAIN="katetextfilter")
target_link_libraries(textfilterplugin PRIVATE KF5::TextEditor) target_link_libraries(textfilterplugin PRIVATE KF5::TextEditor)
ki18n_wrap_ui(UI_SOURCES textfilterwidget.ui)
target_sources(textfilterplugin PRIVATE ${UI_SOURCES})
target_sources(
textfilterplugin
PRIVATE
plugin_katetextfilter.cpp
plugin.qrc
)
kcoreaddons_desktop_to_json(textfilterplugin textfilterplugin.desktop) kcoreaddons_desktop_to_json(textfilterplugin textfilterplugin.desktop)
install(TARGETS textfilterplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor) install(TARGETS textfilterplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
...@@ -3,7 +3,7 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) ...@@ -3,7 +3,7 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII)
remove_definitions(-DQT_NO_URL_CAST_FROM_STRING) remove_definitions(-DQT_NO_URL_CAST_FROM_STRING)
remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
add_library(katexmlcheckplugin MODULE ${katexmlcheckplugin_PART_SRCS}) add_library(katexmlcheckplugin MODULE "")
target_compile_definitions(katexmlcheckplugin PRIVATE TRANSLATION_DOMAIN="katexmlcheck") target_compile_definitions(katexmlcheckplugin PRIVATE TRANSLATION_DOMAIN="katexmlcheck")
target_link_libraries(katexmlcheckplugin PRIVATE KF5::TextEditor) target_link_libraries(katexmlcheckplugin PRIVATE KF5::TextEditor)
......
...@@ -3,7 +3,7 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) ...@@ -3,7 +3,7 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII)
remove_definitions(-DQT_NO_URL_CAST_FROM_STRING) remove_definitions(-DQT_NO_URL_CAST_FROM_STRING)