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