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

0001 # SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 cmake_minimum_required(VERSION 3.16)
0005 
0006 project(layershellqt)
0007 set(PROJECT_VERSION "5.27.5")
0008 set(PROJECT_VERSION_MAJOR 5)
0009 
0010 set(CMAKE_C_STANDARD 99)
0011 
0012 set(QT_MIN_VERSION "5.15.2")
0013 set(KF5_MIN_VERSION "5.102.0")
0014 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0015 
0016 set(CMAKE_CXX_STANDARD 17)
0017 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0018 
0019 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0020 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
0021 
0022 include(KDEInstallDirs)
0023 include(KDECMakeSettings)
0024 include(KDECompilerSettings NO_POLICY_SCOPE)
0025 include(ECMSetupVersion)
0026 include(ECMDeprecationSettings)
0027 include(ECMGenerateHeaders)
0028 include(CMakePackageConfigHelpers)
0029 include(FeatureSummary)
0030 include(GenerateExportHeader)
0031 include(KDEClangFormat)
0032 include(ECMQtDeclareLoggingCategory)
0033 
0034 
0035 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)
0036 if (QT_MAJOR_VERSION EQUAL "5")
0037     find_package(Qt5XkbCommonSupport REQUIRED PRIVATE)
0038     find_package(QtWaylandScanner REQUIRED)
0039 endif()
0040 find_package(WaylandScanner REQUIRED)
0041 find_package(Wayland 1.3 COMPONENTS Client Server)
0042 find_package(WaylandProtocols REQUIRED)
0043 find_package(PkgConfig REQUIRED)
0044 
0045 pkg_check_modules(XKBCOMMON xkbcommon REQUIRED IMPORTED_TARGET)
0046 
0047 set_package_properties(Wayland PROPERTIES
0048                        TYPE REQUIRED)
0049 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90")
0050 
0051 ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX LAYERSHELLQT
0052                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/layershellqt_version.h"
0053                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfigVersion.cmake"
0054                         SOVERSION 5)
0055 
0056 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0057 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0058 
0059 ecm_set_disabled_deprecation_versions(QT 5.15.2
0060     KF 5.101
0061 )
0062 
0063 add_subdirectory(src)
0064 add_subdirectory(tests)
0065 
0066 set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_CMAKEPACKAGEDIR}/LayerShellQt)
0067 install(EXPORT LayerShellQtTargets
0068         NAMESPACE LayerShellQt::
0069         DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0070         FILE LayerShellQtTargets.cmake)
0071 
0072 configure_package_config_file(LayerShellQtConfig.cmake.in
0073     "${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfig.cmake"
0074     INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
0075 
0076 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfig.cmake
0077               ${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfigVersion.cmake
0078         DESTINATION ${CMAKECONFIG_INSTALL_DIR})
0079 
0080 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)