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