Commit 07c207a8 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Utilize kcoreaddons_add_plugin CMake method

This takes care of creating the lib, installing the file and setting the
LIBRARY_OUTPUT_DIRECTORY for the target.
parent 0c933b84
add_library(katebacktracebrowserplugin MODULE "")
kcoreaddons_add_plugin(katebacktracebrowserplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN="katebacktracebrowserplugin")
target_link_libraries(katebacktracebrowserplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -14,9 +14,6 @@ target_sources(
btdatabase.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katebacktracebrowserplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katebacktracebrowserplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
if(BUILD_TESTING)
add_subdirectory(autotests)
......
add_library(katecloseexceptplugin MODULE "")
kcoreaddons_add_plugin(katecloseexceptplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katecloseexceptplugin PRIVATE TRANSLATION_DOMAIN="katecloseexceptplugin")
target_link_libraries(
......@@ -19,6 +19,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katecloseexceptplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katecloseexceptplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
add_library(katecolorpickerplugin MODULE "")
kcoreaddons_add_plugin(katecolorpickerplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katecolorpickerplugin PRIVATE TRANSLATION_DOMAIN="katecolorpickerplugin")
target_link_libraries(katecolorpickerplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -9,6 +9,3 @@ target_sources(
colorpickerconfigpage.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katecolorpickerplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katecolorpickerplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -19,6 +19,3 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/shared
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(compilerexplorer PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS compilerexplorer DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -10,7 +10,7 @@ endif()
find_package(Qt5Test ${QT_MIN_VERSION} QUIET REQUIRED)
add_library(externaltoolsplugin MODULE "")
kcoreaddons_add_plugin(externaltoolsplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(externaltoolsplugin PRIVATE TRANSLATION_DOMAIN="kateexternaltoolsplugin")
target_link_libraries(externaltoolsplugin PRIVATE
KF5::CoreAddons
......@@ -37,10 +37,6 @@ target_sources(
${UI_SOURCES}
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(externaltoolsplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS externaltoolsplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor )
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
......@@ -6,7 +6,7 @@ if(NOT KF5KIO_FOUND)
return()
endif()
add_library(katefilebrowserplugin MODULE "")
kcoreaddons_add_plugin(katefilebrowserplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katefilebrowserplugin PRIVATE TRANSLATION_DOMAIN="katefilebrowserplugin")
target_link_libraries(
......@@ -28,6 +28,3 @@ target_sources(
katefilebrowseropenwithmenu.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katefilebrowserplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katefilebrowserplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -5,7 +5,8 @@ if(NOT KF5GuiAddons_FOUND)
return()
endif()
add_library(katefiletreeplugin MODULE "")
kcoreaddons_add_plugin(katefiletreeplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katefiletreeplugin PRIVATE TRANSLATION_DOMAIN="katefiletree")
target_link_libraries(
......@@ -28,9 +29,6 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katefiletreeplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katefiletreeplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
if(BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -3,7 +3,7 @@ if(WIN32)
return()
endif()
add_library(kategdbplugin MODULE "")
kcoreaddons_add_plugin(kategdbplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(kategdbplugin PRIVATE TRANSLATION_DOMAIN="kategdbplugin")
target_link_libraries(kategdbplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -22,6 +22,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(kategdbplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS kategdbplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
add_library(kategitblameplugin MODULE "")
kcoreaddons_add_plugin(kategitblameplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(kategitblameplugin PRIVATE TRANSLATION_DOMAIN="kategitblameplugin")
target_link_libraries(kategitblameplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -15,6 +15,3 @@ target_include_directories(kategitblameplugin PRIVATE
${CMAKE_SOURCE_DIR}/shared
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(kategitblameplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS kategitblameplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
add_library(katectagsplugin MODULE "")
kcoreaddons_add_plugin(katectagsplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katectagsplugin PRIVATE TRANSLATION_DOMAIN="kate-ctags-plugin")
target_link_libraries(katectagsplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -29,6 +29,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katectagsplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katectagsplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
add_library(katebuildplugin MODULE "")
kcoreaddons_add_plugin(katebuildplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katebuildplugin PRIVATE TRANSLATION_DOMAIN="katebuild-plugin")
target_link_libraries(katebuildplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -17,6 +17,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katebuildplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katebuildplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -8,7 +8,7 @@ if(NOT KF5Wallet_FOUND OR NOT Qt5Sql_FOUND)
return()
endif()
add_library(katesqlplugin MODULE "")
kcoreaddons_add_plugin(katesqlplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katesqlplugin PRIVATE TRANSLATION_DOMAIN="katesql")
target_link_libraries(
......@@ -42,6 +42,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katesqlplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katesqlplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -2,7 +2,7 @@ if(WIN32)
return()
endif()
add_library(katekonsoleplugin MODULE "")
kcoreaddons_add_plugin(katekonsoleplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katekonsoleplugin PRIVATE TRANSLATION_DOMAIN="katekonsoleplugin")
target_link_libraries(katekonsoleplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -13,6 +13,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katekonsoleplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katekonsoleplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -12,9 +12,6 @@ target_sources(
completionmodel.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(latexcompletionplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS latexcompletionplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
if (BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -8,7 +8,7 @@ if(NOT KF5ItemModels_FOUND OR NOT KF5SyntaxHighlighting_FOUND)
return()
endif()
add_library(lspclientplugin MODULE "")
kcoreaddons_add_plugin(lspclientplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(lspclientplugin PRIVATE TRANSLATION_DOMAIN="lspclient")
ki18n_wrap_ui(UI_SOURCES lspconfigwidget.ui)
......@@ -59,9 +59,6 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/shared
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(lspclientplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS lspclientplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
if(BUILD_TESTING)
add_subdirectory(tests)
......
add_library(ktexteditorpreviewplugin MODULE "")
kcoreaddons_add_plugin(ktexteditorpreviewplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(ktexteditorpreviewplugin PRIVATE TRANSLATION_DOMAIN="ktexteditorpreviewplugin")
target_link_libraries(ktexteditorpreviewplugin PRIVATE KF5::I18n KF5::TextEditor)
......@@ -19,7 +19,3 @@ target_sources(
previewwidget.cpp
kpartview.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(ktexteditorpreviewplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS ktexteditorpreviewplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -14,7 +14,7 @@ if(NOT KF5_FOUND OR NOT Qt5Concurrent_FOUND)
return()
endif()
add_library(kateprojectplugin MODULE "")
kcoreaddons_add_plugin(kateprojectplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(kateprojectplugin PRIVATE TRANSLATION_DOMAIN="kateproject")
target_link_libraries(
......@@ -88,9 +88,6 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(kateprojectplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS kateprojectplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
install(FILES kateproject.example DESTINATION ${KDE_INSTALL_DATADIR}/kateproject)
if(BUILD_TESTING)
......
......@@ -8,6 +8,3 @@ target_sources(
rainbowparens_plugin.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(rainbowparens PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS rainbowparens DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
add_library(katereplicodeplugin MODULE "")
kcoreaddons_add_plugin(katereplicodeplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katereplicodeplugin PRIVATE TRANSLATION_DOMAIN="kate-replicode-plugin")
target_link_libraries(
......@@ -22,6 +22,3 @@ target_sources(
plugin.qrc
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katereplicodeplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katereplicodeplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
......@@ -6,7 +6,7 @@ if(NOT KF5ItemViews_FOUND OR NOT Qt5Concurrent_FOUND)
return()
endif()
add_library(katesearchplugin MODULE "")
kcoreaddons_add_plugin(katesearchplugin INSTALL_NAMESPACE "ktexteditor")
target_compile_definitions(katesearchplugin PRIVATE TRANSLATION_DOMAIN="katesearch")
target_link_libraries(
......@@ -35,6 +35,3 @@ target_sources(
search_open_files.cpp
)
# ensure we are able to load plugins pre-install, too, directories must match!
set_target_properties(katesearchplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ktexteditor")
install(TARGETS katesearchplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/ktexteditor)
Supports Markdown
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