summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-16 10:34:13 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-16 12:10:20 (GMT)
commit714e13e107382e926827ccbd68585277fb49ae93 (patch)
tree9ebade30108ff7ab53fb657732e32a4efb2598c9
parentd445185c5ebf8b5648722e2c7cddb3687686a008 (diff)
convert more plugin to macro.
-rw-r--r--plugins/webengineurlinterceptor/adblock/CMakeLists.txt5
-rw-r--r--plugins/webengineurlinterceptor/donottrack/CMakeLists.txt10
2 files changed, 7 insertions, 8 deletions
diff --git a/plugins/webengineurlinterceptor/adblock/CMakeLists.txt b/plugins/webengineurlinterceptor/adblock/CMakeLists.txt
index 13c7055..18c6b03 100644
--- a/plugins/webengineurlinterceptor/adblock/CMakeLists.txt
+++ b/plugins/webengineurlinterceptor/adblock/CMakeLists.txt
@@ -6,7 +6,8 @@ set(webengineviewer_webengineurlinterceptor_adblock_SRCS
ecm_qt_declare_logging_category(webengineviewer_webengineurlinterceptor_adblock_SRCS HEADER adblockinterceptor_debug.h IDENTIFIER ADBLOCKINTERCEPTOR_LOG CATEGORY_NAME log_adblockinterceptor)
-add_library(webengineviewer_adblockplugin MODULE ${webengineviewer_webengineurlinterceptor_adblock_SRCS})
+kcoreaddons_add_plugin(webengineviewer_adblockplugin JSON messageviewer_adblockurlinterceptor.json SOURCES
+ ${webengineviewer_webengineurlinterceptor_adblock_SRCS} INSTALL_NAMESPACE webengineviewer)
target_link_libraries(webengineviewer_adblockplugin
KF5::MessageViewer
@@ -20,8 +21,6 @@ target_link_libraries(webengineviewer_adblockplugin
KF5::WebEngineViewer
)
-install(TARGETS webengineviewer_adblockplugin DESTINATION ${PLUGIN_INSTALL_DIR}/webengineviewer)
-
if(BUILD_TESTING)
add_subdirectory(tests)
add_subdirectory(autotests)
diff --git a/plugins/webengineurlinterceptor/donottrack/CMakeLists.txt b/plugins/webengineurlinterceptor/donottrack/CMakeLists.txt
index 10154cc..5031b98 100644
--- a/plugins/webengineurlinterceptor/donottrack/CMakeLists.txt
+++ b/plugins/webengineurlinterceptor/donottrack/CMakeLists.txt
@@ -10,7 +10,8 @@ kconfig_add_kcfg_files(webengineviewer_webengineurlinterceptor_donottrack_SRCS
)
-add_library(webengineviewer_donottrackplugin MODULE ${webengineviewer_webengineurlinterceptor_donottrack_SRCS})
+kcoreaddons_add_plugin(webengineviewer_donottrackplugin JSON messageviewer_donottrackurlinterceptor.json SOURCES
+ ${webengineviewer_webengineurlinterceptor_donottrack_SRCS} INSTALL_NAMESPACE webengineviewer)
target_link_libraries(webengineviewer_donottrackplugin
Qt5::WebEngine
@@ -19,7 +20,6 @@ target_link_libraries(webengineviewer_donottrackplugin
KF5::ConfigGui
KF5::CoreAddons
)
-
-install(TARGETS webengineviewer_donottrackplugin DESTINATION ${PLUGIN_INSTALL_DIR}/webengineviewer)
-
-add_subdirectory(autotests)
+if(BUILD_TESTING)
+ add_subdirectory(autotests)
+endif()