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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 project(plasma-sdk)
0004 set(PROJECT_VERSION "6.0.80")
0005 set(PROJECT_VERSION_MAJOR 6)
0006 
0007 set(PROJECT_DEP_VERSION "6.0.80")
0008 set(QT_MIN_VERSION "6.6.0")
0009 set(KF6_MIN_VERSION "5.240.0")
0010 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0011 
0012 set(CMAKE_CXX_STANDARD 20)
0013 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0014 
0015 ################# Disallow in-source build #################
0016 
0017 if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
0018     message(FATAL_ERROR "plasmate requires an out of source build. Please create a separate build directory and run 'cmake path_to_plasmate [options]' there.")
0019 endif()
0020 
0021 ################# set KDE specific information #################
0022 
0023 find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
0024 
0025 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
0026 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0027 
0028 include(KDEInstallDirs)
0029 include(KDECMakeSettings)
0030 include(KDECompilerSettings NO_POLICY_SCOPE)
0031 include(KDEClangFormat)
0032 include(KDEGitCommitHooks)
0033 include(ECMDeprecationSettings)
0034 include(ECMQmlModule)
0035 include(FeatureSummary)
0036 
0037 find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Gui Qml Quick Svg Widgets Xml)
0038 
0039 find_package(Qt6Test ${QT_MIN_VERSION} CONFIG QUIET)
0040 set_package_properties(Qt6Test PROPERTIES
0041     PURPOSE "Required for tests"
0042     TYPE OPTIONAL
0043 )
0044 add_feature_info("Qt6Test" Qt5Test_FOUND "Required for building tests")
0045 if (NOT Qt6Test_FOUND)
0046     set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
0047 endif()
0048 
0049 find_package(Qt6Core5Compat)
0050 
0051 
0052 find_package(KF6Kirigami2 ${KF6_MIN_VERSION})
0053 set_package_properties(KF6Kirigami2 PROPERTIES
0054     DESCRIPTION "KDE's lightweight user interface framework for mobile and convergent applications"
0055     URL "https://techbase.kde.org/Kirigami"
0056     PURPOSE "Required by lookandfeelexplorer"
0057     TYPE RUNTIME
0058 )
0059 
0060 find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
0061     Archive Completion Config ConfigWidgets CoreAddons DBusAddons I18n IconThemes ItemModels
0062     KIO TextEditor WidgetsAddons DocTools Svg)
0063 
0064 find_package(Plasma ${PROJECT_DEP_VERSION} REQUIRED)
0065 find_package(PlasmaQuick ${PROJECT_DEP_VERSION} REQUIRED)
0066 find_package(Plasma5Support ${PROJECT_DEP_VERSION} REQUIRED)
0067 
0068 #########################################################################
0069 add_definitions(
0070     -DQT_DEPRECATED_WARNINGS
0071     -DQT_USE_QSTRINGBUILDER
0072     -DQT_NO_CAST_TO_ASCII
0073 #     -DQT_NO_CAST_FROM_ASCII
0074     -DQT_NO_CAST_FROM_BYTEARRAY
0075     -DQT_STRICT_ITERATORS
0076     -DQT_NO_URL_CAST_FROM_STRING
0077     -DQT_NO_SIGNALS_SLOTS_KEYWORDS
0078 )
0079 
0080 ecm_set_disabled_deprecation_versions(
0081     KF 5.94.0
0082 )
0083 
0084 add_subdirectory(iconexplorer)
0085 add_subdirectory(engineexplorer)
0086 add_subdirectory(kqml)
0087 add_subdirectory(plasmoidviewer)
0088 add_subdirectory(themeexplorer)
0089 add_subdirectory(lookandfeelexplorer)
0090 
0091 # add clang-format target for all our real source files
0092 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0093 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0094 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0095 
0096 ki18n_install(po)
0097 kdoctools_install(po)
0098 
0099 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)