Warning, /plasma/kdeplasma-addons/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 project(kdeplasma-addons)
0004 set(PROJECT_VERSION "5.27.5")
0005 set(PROJECT_VERSION_MAJOR 5)
0006 
0007 ################# Disallow in-source build #################
0008 if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
0009    message(FATAL_ERROR "plasma requires an out of source build. Please create a separate build directory and run 'cmake path_to_plasma [options]' there.")
0010 endif()
0011 
0012 set(QT_MIN_VERSION 5.15.0)
0013 set(KF5_MIN_VERSION 5.90.0)
0014 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0015 
0016 set(CMAKE_CXX_STANDARD 17)
0017 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0018 
0019 include(FeatureSummary)
0020 
0021 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0022 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0023 
0024 include(KDEInstallDirs)
0025 include(KDECMakeSettings)
0026 include(KDECompilerSettings NO_POLICY_SCOPE)
0027 include(ECMQtDeclareLoggingCategory)
0028 include(ECMInstallIcons)
0029 include(KDEPackageAppTemplates)
0030 include(GenerateExportHeader)
0031 include(CMakePackageConfigHelpers)
0032 include(KDEClangFormat)
0033 include(KDEGitCommitHooks)
0034 include(ECMDeprecationSettings)
0035 
0036 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED
0037     Core
0038     Gui
0039     DBus
0040     Quick
0041     Qml
0042     Widgets
0043     Test
0044 )
0045 
0046 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0047     Config
0048     CoreAddons
0049     Declarative
0050     Holidays
0051     I18n
0052     KIO
0053     KCMUtils
0054     Notifications
0055     Plasma
0056     Runner
0057     Service
0058     Sonnet
0059     UnitConversion
0060     NewStuff
0061 )
0062 
0063 if(${QT_MAJOR_VERSION} LESS 6)
0064     find_package(KF5NetworkManagerQt CONFIG QUIET)
0065     set_package_properties(KF5NetworkManagerQt PROPERTIES
0066         DESCRIPTION "Qt wrapper for NetworkManager API"
0067         PURPOSE "Disable wallpaper update when using metered connections"
0068         TYPE OPTIONAL
0069     )
0070     if(KF5NetworkManagerQt_FOUND)
0071         set(HAVE_NetworkManagerQt TRUE)
0072     endif()
0073 endif()
0074 
0075 find_package(KF5Purpose CONFIG QUIET)
0076 set_package_properties(KF5Purpose PROPERTIES
0077     DESCRIPTION "Framework for cross-application services and actions"
0078     PURPOSE "Needed for QuickShare applet"
0079     URL "https://commits.kde.org/purpose"
0080     TYPE RUNTIME
0081 )
0082 
0083 find_package(ICU 66.1 COMPONENTS uc i18n)
0084 set_package_properties(ICU
0085         PROPERTIES DESCRIPTION "Unicode and Globalization support for software applications"
0086         TYPE OPTIONAL
0087         PURPOSE "Provides alternate calendar systems that are not available in QCalendar"
0088         )
0089 if(ICU_FOUND)
0090     set(HAVE_ICU TRUE)
0091 endif()
0092 
0093 add_definitions(
0094     -DQT_DEPRECATED_WARNINGS
0095     -DQT_NO_URL_CAST_FROM_STRING
0096 )
0097 
0098 ecm_set_disabled_deprecation_versions(
0099     QT 5.15.2
0100 )
0101 
0102 add_subdirectory(dict)
0103 add_subdirectory(profiles)
0104 add_subdirectory(applets)
0105 add_subdirectory(runners)
0106 
0107 add_subdirectory(wallpapers)
0108 
0109 add_subdirectory(windowswitchers)
0110 add_subdirectory(desktopswitchers)
0111 
0112 add_subdirectory(plasmacalendarplugins)
0113 
0114 add_subdirectory(templates)
0115 add_subdirectory(appiumtests)
0116 
0117 # add clang-format target for all our real source files
0118 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0119 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0120 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0121 
0122 ki18n_install(po)
0123 
0124 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)