Warning, /plasma/qqc2-breeze-style/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 project(qqc2-breeze-style)
0002 set(PROJECT_VERSION "6.0.0")
0003 
0004 cmake_minimum_required(VERSION 3.16)
0005 
0006 set(QT_MIN_VERSION "6.6.0")
0007 set(KF6_MIN_VERSION "5.240.0")
0008 set(KF_DEP_VERSION "5.240.0")
0009 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0010 
0011 set(CMAKE_CXX_STANDARD 20)
0012 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0013 
0014 find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
0015 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} )
0016 
0017 ################# Disallow in-source build #################
0018 
0019 if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
0020    message(FATAL_ERROR "qqc2-breeze-style requires an out of source build. Please create a separate build directory and run 'cmake -S /path/to/qqc2-breeze-style' there.")
0021 endif()
0022 
0023 # Make CPack available to easy generate binary packages
0024 include(CPack)
0025 include(FeatureSummary)
0026 
0027 ################# set KDE specific information #################
0028 
0029 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
0030 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0031 
0032 include(ECMSetupVersion)
0033 include(ECMGenerateHeaders)
0034 include(KDEInstallDirs)
0035 include(KDECMakeSettings)
0036 include(KDECompilerSettings NO_POLICY_SCOPE)
0037 include(KDEClangFormat)
0038 include(KDEGitCommitHooks)
0039 include(ECMQmlModule)
0040 
0041 find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Gui Qml Quick QuickControls2 QuickTemplates2)
0042 
0043 if (NOT ANDROID)
0044     find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus)
0045     find_package(KF6IconThemes ${KF6_MIN_VERSION} REQUIRED)
0046 endif()
0047 
0048 find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS GuiAddons Config KirigamiPlatform CoreAddons ColorScheme QuickCharts)
0049 
0050 if (NOT APPLE AND NOT WIN32)
0051     find_package(X11)
0052 endif()
0053 
0054 # When building as a static plugin, dependencies may add a -lQt5X11Extras
0055 # to the linker, in that case, it requires to have the proper variables
0056 # to exists.
0057 find_package(Qt6X11Extras ${QT_MIN_VERSION} NO_MODULE QUIET)
0058 
0059 set_package_properties(QuickCharts PROPERTIES DESCRIPTION "KF6 QuickCharts framework"
0060                        TYPE REQUIRED
0061                        PURPOSE "Used to implement the BusyIndicator style"
0062                       )
0063 set_package_properties(IconThemes PROPERTIES DESCRIPTION "KF6 IconThemes framework"
0064                        TYPE OPTIONAL
0065                        PURPOSE "Optional integration of Kirigami with KIconLoader icons handling for a better integration with Plasma Desktop"
0066                       )
0067 set_package_properties(ColorScheme PROPERTIES DESCRIPTION "KF6 ColorScheme framework"
0068                        TYPE OPTIONAL
0069                        PURPOSE "Optional integration of Kirigami with KColorScheme for color palettes integration with Plasma Desktop"
0070                       )
0071 
0072 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/QQC2BreezeStyle")
0073 
0074 configure_package_config_file(
0075   "${CMAKE_CURRENT_SOURCE_DIR}/QQC2BreezeStyleConfig.cmake.in"
0076   "${CMAKE_CURRENT_BINARY_DIR}/QQC2BreezeStyleConfig.cmake"
0077   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0078   PATH_VARS  KDE_INSTALL_INCLUDEDIR_KF CMAKE_INSTALL_PREFIX
0079 )
0080 
0081 install(FILES
0082   "${CMAKE_CURRENT_BINARY_DIR}/QQC2BreezeStyleConfig.cmake"
0083   "${CMAKE_CURRENT_BINARY_DIR}/QQC2BreezeStyleConfigVersion.cmake"
0084   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0085   COMPONENT Devel
0086 )
0087 
0088 
0089 ecm_setup_version(PROJECT
0090     VARIABLE_PREFIX QQC2BREEZESTYLE
0091     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/QQC2BreezeStyleConfigVersion.cmake"
0092     SOVERSION 5)
0093 
0094 #########################################################################
0095 add_definitions(-DQT_NO_FOREACH)
0096 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
0097 add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054900)
0098 
0099 add_subdirectory(style)
0100 
0101 add_subdirectory(kirigami-plasmadesktop-integration)
0102 
0103 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0104 
0105 # add clang-format target for all our real source files
0106 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0107 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0108 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)