Warning, /utilities/sweeper/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
0002 
0003 # KDE Application Version, managed by release script
0004 set (RELEASE_SERVICE_VERSION_MAJOR "22")
0005 set (RELEASE_SERVICE_VERSION_MINOR "11")
0006 set (RELEASE_SERVICE_VERSION_MICRO "70")
0007 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0008 
0009 project(sweeper VERSION ${RELEASE_SERVICE_VERSION})
0010 
0011 set(QT_MIN_VERSION "5.15.2")
0012 set(KF5_MIN_VERSION "5.90.0")
0013 
0014 find_package(ECM ${KF5_MIN_VERSION} NO_MODULE REQUIRED)
0015 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0016 
0017 include(KDEInstallDirs)
0018 include(KDECMakeSettings)
0019 include(KDECompilerSettings NO_POLICY_SCOPE)
0020 
0021 include(ECMAddAppIcon)
0022 include(ECMQtDeclareLoggingCategory)
0023 include(FeatureSummary)
0024 
0025 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Core DBus Widgets)
0026 
0027 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0028     ActivitiesStats
0029     Bookmarks
0030     Crash
0031     Config
0032     ConfigWidgets
0033     CoreAddons
0034     I18n
0035     KIO
0036     TextWidgets
0037     XmlGui
0038 )
0039 find_package(KF5DocTools ${KF5_MIN_VERSION})
0040 set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
0041     "Tools to generate documentation"
0042     TYPE OPTIONAL
0043 )
0044 
0045 
0046 add_definitions(
0047     -DQT_DISABLE_DEPRECATED_BEFORE=0x050f00
0048     -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
0049     -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055800
0050     -DKF_DEPRECATED_WARNINGS_SINCE=0x060000
0051 )
0052 
0053 include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
0054 
0055 configure_file(config-sweeper.h.cmake
0056     ${CMAKE_CURRENT_BINARY_DIR}/config-sweeper.h
0057 )
0058 
0059 add_executable(sweeper)
0060 target_sources(sweeper PRIVATE
0061    main.cpp 
0062    sweeper.cpp 
0063    privacyfunctions.cpp 
0064    privacyaction.cpp
0065    privacyaction.h
0066    sweeper.h
0067    privacyfunctions.h
0068    )
0069 ecm_qt_declare_logging_category(sweeper HEADER sweeper_debug.h IDENTIFIER SWEEPER_LOG CATEGORY_NAME org.kde.sweeper DESCRIPTION "sweeper" EXPORT SWEEPER)
0070 
0071 
0072 qt_add_dbus_adaptor( sweeper_SRCS org.kde.sweeper.xml sweeper.h Sweeper)
0073 target_sources(sweeper PRIVATE ${sweeper_SRCS})
0074                 
0075 ki18n_wrap_ui(sweeper sweeperdialog.ui )
0076 
0077 target_link_libraries(sweeper
0078    Qt${QT_MAJOR_VERSION}::Core
0079    Qt${QT_MAJOR_VERSION}::DBus
0080    Qt${QT_MAJOR_VERSION}::Widgets
0081    KF5::ActivitiesStats
0082    KF5::Bookmarks
0083    KF5::Crash
0084    KF5::I18n
0085    KF5::KIOCore
0086    KF5::TextWidgets
0087    KF5::XmlGui
0088 )
0089 
0090 install(TARGETS sweeper  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
0091 
0092 
0093 ########### install files ###############
0094 
0095 install( PROGRAMS org.kde.sweeper.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
0096 install( FILES sweeperui.rc  DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/sweeper)
0097 install( FILES org.kde.sweeper.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} )
0098 install( FILES org.kde.sweeper.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0099 
0100 ki18n_install(po)
0101 if(KF5DocTools_FOUND)
0102     kdoctools_install(po)
0103     add_subdirectory(doc)
0104 endif()
0105 ecm_qt_install_logging_categories(
0106         EXPORT SWEEPER
0107         FILE sweeper.categories
0108         DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0109         )
0110 
0111 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)