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 "5.27.10")
0005 set(PROJECT_VERSION_MAJOR 5)
0006 
0007 set(QT_MIN_VERSION "5.15.2")
0008 set(KF5_MIN_VERSION "5.102.0")
0009 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0010 
0011 set(CMAKE_CXX_STANDARD 17)
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 ${KF5_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(FeatureSummary)
0034 
0035 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Gui Qml Quick Svg Widgets Xml)
0036 
0037 find_package(Qt${QT_MAJOR_VERSION}Test ${QT_MIN_VERSION} CONFIG QUIET)
0038 set_package_properties(Qt${QT_MAJOR_VERSION}Test PROPERTIES
0039     PURPOSE "Required for tests"
0040     TYPE OPTIONAL
0041 )
0042 add_feature_info("Qt${QT_MAJOR_VERSION}Test" Qt5Test_FOUND "Required for building tests")
0043 if (NOT Qt${QT_MAJOR_VERSION}Test_FOUND)
0044     set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
0045 endif()
0046 
0047 if (QT_MAJOR_VERSION STREQUAL "6")
0048     find_package(Qt6Core5Compat)
0049 endif()
0050 
0051 
0052 find_package(KF5Kirigami2 ${KF5_MIN_VERSION})
0053 set_package_properties(KF5Kirigami2 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(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0061     Archive Completion Config ConfigWidgets CoreAddons DBusAddons Declarative I18n IconThemes
0062     KIO Plasma PlasmaQuick Service TextEditor WidgetsAddons DocTools)
0063 
0064 #########################################################################
0065 add_definitions(
0066     -DQT_DEPRECATED_WARNINGS
0067     -DQT_USE_QSTRINGBUILDER
0068     -DQT_NO_CAST_TO_ASCII
0069 #     -DQT_NO_CAST_FROM_ASCII
0070     -DQT_NO_CAST_FROM_BYTEARRAY
0071     -DQT_STRICT_ITERATORS
0072     -DQT_NO_URL_CAST_FROM_STRING
0073     -DQT_NO_SIGNALS_SLOTS_KEYWORDS
0074 )
0075 
0076 ecm_set_disabled_deprecation_versions(
0077     KF 5.94.0
0078 )
0079 
0080 add_subdirectory(cuttlefish)
0081 add_subdirectory(engineexplorer)
0082 add_subdirectory(plasmoidviewer)
0083 add_subdirectory(themeexplorer)
0084 add_subdirectory(lookandfeelexplorer)
0085 
0086 # add clang-format target for all our real source files
0087 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0088 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0089 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0090 
0091 ki18n_install(po)
0092 kdoctools_install(po)
0093 
0094 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)