Warning, /plasma/plasma-integration/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 project(PlasmaIntegration) 0004 set(PROJECT_VERSION "6.0.80") 0005 set(PROJECT_VERSION_MAJOR 6) 0006 0007 set(QT5_MIN_VERSION "5.15.2") 0008 set(QT_MIN_VERSION "6.6.0") 0009 set(KF5_MIN_VERSION "5.102.0") 0010 set(KF6_MIN_VERSION "5.240.0") 0011 set(KDE_COMPILERSETTINGS_LEVEL "5.82") 0012 0013 set(CMAKE_CXX_STANDARD 20) 0014 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0015 0016 set(QT_NO_CREATE_VERSIONLESS_TARGETS ON) 0017 set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS ON) 0018 0019 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) 0020 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ) 0021 0022 # We need this because we can't include KDECMakeSettings here, because that 0023 # would need KDEInstallDirs, which we can only include in the qt{5,6} subdirs 0024 # to get the correct installation dirs for each Qt version. 0025 option(BUILD_TESTING "Build the testing tree." ON) 0026 if(BUILD_TESTING) 0027 enable_testing() 0028 endif() 0029 0030 include(KDECompilerSettings NO_POLICY_SCOPE) 0031 include(FeatureSummary) 0032 include(GenerateExportHeader) 0033 include(KDEClangFormat) 0034 include(KDEGitCommitHooks) 0035 include(ECMDeprecationSettings) 0036 0037 find_package(Wayland 1.9 REQUIRED Client) 0038 find_package(PlasmaWaylandProtocols 1.6.0 CONFIG REQUIRED) 0039 0040 option(BUILD_QT5 "Build for Qt5" ON) 0041 option(BUILD_QT6 "Build for Qt6" ON) 0042 0043 #CI is stupid and doesn't allow us to set CMAKE options per build variant 0044 if ($ENV{CI_JOB_NAME_SLUG} MATCHES "qt5") 0045 set(BUILD_QT5 ON) 0046 set(BUILD_QT6 OFF) 0047 elseif($ENV{CI_JOB_NAME_SLUG} MATCHES "qt6") 0048 set(BUILD_QT5 OFF) 0049 set(BUILD_QT6 ON) 0050 endif() 0051 0052 find_package(XCB COMPONENTS XCB) 0053 set_package_properties(XCB PROPERTIES 0054 DESCRIPTION "X protocol C-language Binding" 0055 URL "https://xcb.freedesktop.org" 0056 TYPE REQUIRED 0057 PURPOSE "Required to pass style properties to native Windows on X11 Platform" 0058 ) 0059 0060 find_package(FontNotoSans) 0061 set_package_properties(FontNotoSans PROPERTIES 0062 PURPOSE "Default sans-serif font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true to mark it ignored." 0063 URL "https://www.google.com/get/noto/" 0064 TYPE RUNTIME 0065 ) 0066 find_package(FontNotoColorEmoji) 0067 set_package_properties(FontNotoColorEmoji PROPERTIES 0068 PURPOSE "Default emoji font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoColorEmoji=true to mark it ignored." 0069 URL "https://www.google.com/get/noto/" 0070 TYPE RUNTIME 0071 ) 0072 find_package(FontHack) 0073 set_package_properties(FontHack PROPERTIES 0074 PURPOSE "Default monospace font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true to mark it ignored." 0075 URL "https://sourcefoundry.org/hack/" 0076 TYPE RUNTIME 0077 ) 0078 find_package(XDGDesktopPortalKDE) 0079 set_package_properties(XDGDesktopPortalKDE PROPERTIES 0080 PURPOSE "Required for open-with dialog to work correctly -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_XDGDesktopPortalKDE=true to mark it ignored." 0081 URL "https://invent.kde.org/plasma/xdg-desktop-portal-kde" 0082 TYPE RUNTIME 0083 ) 0084 0085 # add clang-format target for all our real source files 0086 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0087 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0088 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 0089 0090 if (${BUILD_QT5}) 0091 unset(QUERY_EXECUTABLE CACHE) 0092 add_subdirectory(qt5) 0093 endif() 0094 0095 if (${BUILD_QT6}) 0096 unset(QUERY_EXECUTABLE CACHE) 0097 0098 add_definitions(-DTRANSLATION_DOMAIN=\"plasmaintegration5\") 0099 add_subdirectory(qt6) 0100 0101 find_package(KF6I18n CONFIG REQUIRED) 0102 ki18n_install(po) 0103 endif() 0104 0105 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)