Commit 76e14f66 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Create simple kate_add_plugin function to wrap kcoreaddons_add_plugin

This way we don't repeat the namespace information for all the different plugins.

Also if we want to switch to static plugins, for example in AppImage builds, the
changes will be minimal and only in the kate_add_plugin funtion.
parent 07c207a8
function (kate_add_plugin name)
kcoreaddons_add_plugin(${name} INSTALL_NAMESPACE "ktexteditor")
endfunction()
# Most plugins will need to link against KF5TextEditor to have access to its plugin interface.
find_package(KF5TextEditor ${KF5_DEP_VERSION} QUIET REQUIRED)
......
kcoreaddons_add_plugin(katebacktracebrowserplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katebacktracebrowserplugin)
target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN="katebacktracebrowserplugin")
target_link_libraries(katebacktracebrowserplugin PRIVATE KF5::I18n KF5::TextEditor)
......
kcoreaddons_add_plugin(katecloseexceptplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katecloseexceptplugin)
target_compile_definitions(katecloseexceptplugin PRIVATE TRANSLATION_DOMAIN="katecloseexceptplugin")
target_link_libraries(
......
kcoreaddons_add_plugin(katecolorpickerplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katecolorpickerplugin)
target_compile_definitions(katecolorpickerplugin PRIVATE TRANSLATION_DOMAIN="katecolorpickerplugin")
target_link_libraries(katecolorpickerplugin PRIVATE KF5::I18n KF5::TextEditor)
......
......@@ -10,7 +10,7 @@ endif()
find_package(Qt5Test ${QT_MIN_VERSION} QUIET REQUIRED)
kcoreaddons_add_plugin(externaltoolsplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(externaltoolsplugin)
target_compile_definitions(externaltoolsplugin PRIVATE TRANSLATION_DOMAIN="kateexternaltoolsplugin")
target_link_libraries(externaltoolsplugin PRIVATE
KF5::CoreAddons
......
......@@ -6,7 +6,7 @@ if(NOT KF5KIO_FOUND)
return()
endif()
kcoreaddons_add_plugin(katefilebrowserplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katefilebrowserplugin)
target_compile_definitions(katefilebrowserplugin PRIVATE TRANSLATION_DOMAIN="katefilebrowserplugin")
target_link_libraries(
......
......@@ -5,7 +5,7 @@ if(NOT KF5GuiAddons_FOUND)
return()
endif()
kcoreaddons_add_plugin(katefiletreeplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katefiletreeplugin)
target_compile_definitions(katefiletreeplugin PRIVATE TRANSLATION_DOMAIN="katefiletree")
......
......@@ -3,7 +3,7 @@ if(WIN32)
return()
endif()
kcoreaddons_add_plugin(kategdbplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(kategdbplugin)
target_compile_definitions(kategdbplugin PRIVATE TRANSLATION_DOMAIN="kategdbplugin")
target_link_libraries(kategdbplugin PRIVATE KF5::I18n KF5::TextEditor)
......
kcoreaddons_add_plugin(kategitblameplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(kategitblameplugin)
target_compile_definitions(kategitblameplugin PRIVATE TRANSLATION_DOMAIN="kategitblameplugin")
target_link_libraries(kategitblameplugin PRIVATE KF5::I18n KF5::TextEditor)
......
kcoreaddons_add_plugin(katectagsplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katectagsplugin)
target_compile_definitions(katectagsplugin PRIVATE TRANSLATION_DOMAIN="kate-ctags-plugin")
target_link_libraries(katectagsplugin PRIVATE KF5::I18n KF5::TextEditor)
......
kcoreaddons_add_plugin(katebuildplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katebuildplugin)
target_compile_definitions(katebuildplugin PRIVATE TRANSLATION_DOMAIN="katebuild-plugin")
target_link_libraries(katebuildplugin PRIVATE KF5::I18n KF5::TextEditor)
......
......@@ -8,7 +8,7 @@ if(NOT KF5Wallet_FOUND OR NOT Qt5Sql_FOUND)
return()
endif()
kcoreaddons_add_plugin(katesqlplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katesqlplugin)
target_compile_definitions(katesqlplugin PRIVATE TRANSLATION_DOMAIN="katesql")
target_link_libraries(
......
......@@ -2,7 +2,7 @@ if(WIN32)
return()
endif()
kcoreaddons_add_plugin(katekonsoleplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katekonsoleplugin)
target_compile_definitions(katekonsoleplugin PRIVATE TRANSLATION_DOMAIN="katekonsoleplugin")
target_link_libraries(katekonsoleplugin PRIVATE KF5::I18n KF5::TextEditor)
......
......@@ -8,7 +8,7 @@ if(NOT KF5ItemModels_FOUND OR NOT KF5SyntaxHighlighting_FOUND)
return()
endif()
kcoreaddons_add_plugin(lspclientplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(lspclientplugin)
target_compile_definitions(lspclientplugin PRIVATE TRANSLATION_DOMAIN="lspclient")
ki18n_wrap_ui(UI_SOURCES lspconfigwidget.ui)
......
kcoreaddons_add_plugin(ktexteditorpreviewplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(ktexteditorpreviewplugin)
target_compile_definitions(ktexteditorpreviewplugin PRIVATE TRANSLATION_DOMAIN="ktexteditorpreviewplugin")
target_link_libraries(ktexteditorpreviewplugin PRIVATE KF5::I18n KF5::TextEditor)
......
......@@ -14,7 +14,7 @@ if(NOT KF5_FOUND OR NOT Qt5Concurrent_FOUND)
return()
endif()
kcoreaddons_add_plugin(kateprojectplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(kateprojectplugin)
target_compile_definitions(kateprojectplugin PRIVATE TRANSLATION_DOMAIN="kateproject")
target_link_libraries(
......
kcoreaddons_add_plugin(katereplicodeplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katereplicodeplugin)
target_compile_definitions(katereplicodeplugin PRIVATE TRANSLATION_DOMAIN="kate-replicode-plugin")
target_link_libraries(
......
......@@ -6,7 +6,7 @@ if(NOT KF5ItemViews_FOUND OR NOT Qt5Concurrent_FOUND)
return()
endif()
kcoreaddons_add_plugin(katesearchplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katesearchplugin)
target_compile_definitions(katesearchplugin PRIVATE TRANSLATION_DOMAIN="katesearch")
target_link_libraries(
......
......@@ -5,7 +5,7 @@ if(NOT KF5NewStuff_FOUND)
return()
endif()
kcoreaddons_add_plugin(katesnippetsplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katesnippetsplugin)
target_compile_definitions(katesnippetsplugin PRIVATE TRANSLATION_DOMAIN="katesnippetsplugin")
target_link_libraries(
......
kcoreaddons_add_plugin(katesymbolviewerplugin INSTALL_NAMESPACE "ktexteditor")
kate_add_plugin(katesymbolviewerplugin)
target_compile_definitions(katesymbolviewerplugin PRIVATE TRANSLATION_DOMAIN="katesymbolviewer")
target_link_libraries(katesymbolviewerplugin PRIVATE KF5::I18n KF5::TextEditor)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment