Warning, /pim/kdepim-addons/plugins/webengineurlinterceptor/adblock/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 add_custom_target(adblock
0005     SOURCES
0006     rs/adblock/Cargo.toml
0007     rs/adblock/build.rs
0008     rs/adblock/src/lib.rs
0009     rs/adblock/src/adblock.rs
0010     rs/adblock/src/domainresolver.rs
0011     rs/adblock/src/logging.rs
0012 )
0013 
0014 corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/rs/adblock/Cargo.toml)
0015 
0016 add_library(adblockplugin)
0017 
0018 target_include_directories(adblockplugin PRIVATE
0019     ${CMAKE_BINARY_DIR}/cargo/build/${Rust_CARGO_TARGET}/cxxbridge/webengineviewer-adblock/src/)
0020 
0021 target_sources(adblockplugin PRIVATE
0022     adblockfilterlistsmodel.h
0023     adblockfilterlistsmodel.cpp
0024     adblockfilter.h
0025     adblockfilter.cpp
0026     adblockpluginurlinterceptorconfiguredialog.cpp
0027     adblockpluginurlinterceptorconfiguredialog.h
0028     adblockpluginurlinterceptorconfigurewidget.cpp
0029     adblockpluginurlinterceptorconfigurewidget.h
0030     adblockfiltertreeview.h
0031     adblockfiltertreeview.cpp
0032     adblockfilterdialog.h
0033     adblockfilterdialog.cpp
0034     adblockfilterwidget.h
0035     adblockfilterwidget.cpp
0036     adblockmanager.h
0037     adblockmanager.cpp
0038 
0039     adblocklistsmanager.h
0040     adblocklistsmanager.cpp
0041 
0042     adblockpluginurlinterceptoraddadblocklistdialog.h
0043     adblockpluginurlinterceptoraddadblocklistdialog.cpp
0044 
0045     adblockpluginurlinterceptoraddadblocklistwidget.h
0046     adblockpluginurlinterceptoraddadblocklistwidget.cpp
0047 
0048     adblockplugin_private_export.h
0049     adblocklistsutil.h
0050     adblocklistsutil.cpp
0051 
0052     adblockviewfilterdialog.h
0053     adblockviewfilterdialog.cpp
0054 
0055     adblockviewfilterwidget.h
0056     adblockviewfilterwidget.cpp
0057     )
0058 
0059 kconfig_add_kcfg_files(adblockplugin
0060     settings/globalsettings_webengineurlinterceptoradblock.kcfgc
0061     )
0062 
0063 ecm_qt_declare_logging_category(adblockplugin HEADER libadblockplugin_debug.h IDENTIFIER LIBADBLOCKPLUGIN_PLUGIN_LOG
0064     CATEGORY_NAME org.kde.pim.libadblockplugin
0065     DESCRIPTION "kdepim-addons (adblockplugin lib)"
0066     EXPORT KDEPIMADDONS
0067     )
0068 
0069 if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
0070     set_target_properties(adblockplugin PROPERTIES UNITY_BUILD ON)
0071 endif()
0072 
0073 generate_export_header(adblockplugin BASE_NAME libadblockplugin)
0074 target_link_libraries(adblockplugin
0075     KF6::I18n
0076     Qt::WebEngineWidgets
0077     KPim6::WebEngineViewer
0078     webengineviewer-adblock
0079     KF6::TextCustomEditor
0080     )
0081 
0082 set_target_properties(adblockplugin
0083     PROPERTIES OUTPUT_NAME adblockplugin VERSION ${KDEPIMADDONS_LIB_VERSION} SOVERSION ${KDEPIMADDONS_LIB_SOVERSION}
0084     )
0085 
0086 install(TARGETS adblockplugin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
0087 
0088 kcoreaddons_add_plugin(webengineviewer_adblockplugin INSTALL_NAMESPACE pim6/webengineviewer/urlinterceptor)
0089 target_sources(webengineviewer_adblockplugin PRIVATE
0090     adblockinterceptorinterface.cpp
0091     adblockinterceptorinterface.h
0092     adblockpluginurlinterceptor.cpp
0093     adblockpluginurlinterceptor.h
0094     )
0095 
0096 
0097 
0098 ecm_qt_declare_logging_category(webengineviewer_adblockplugin HEADER adblockinterceptor_debug.h IDENTIFIER ADBLOCKINTERCEPTOR_LOG CATEGORY_NAME org.kde.pim.adblockinterceptor
0099     DESCRIPTION "kdepim-addons (adblock interceptor)"
0100     OLD_CATEGORY_NAMES log_adblockinterceptor
0101     EXPORT KDEPIMADDONS
0102     )
0103 
0104 target_link_libraries(webengineviewer_adblockplugin
0105     KPim6::MessageViewer
0106     KF6::I18n
0107     Qt::WebEngineWidgets
0108     KPim6::WebEngineViewer
0109 
0110     adblockplugin
0111     )
0112 target_include_directories(webengineviewer_adblockplugin PRIVATE
0113     ${CMAKE_BINARY_DIR}/cargo/build/${Rust_CARGO_TARGET}/cxxbridge/webengineviewer-adblock/src/)
0114 
0115 if(BUILD_TESTING)
0116     add_subdirectory(autotests)
0117     add_subdirectory(tests)
0118 endif()