layer-shell-qt-nokde/CMakeLists.txt

66 lines
2.3 KiB
CMake
Raw Normal View History

2021-04-06 11:05:35 +00:00
# SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
2021-04-01 00:28:01 +00:00
cmake_minimum_required(VERSION 3.16)
project(layershellqt)
set(PROJECT_VERSION "5.21.80")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.78")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)
find_package(Qt5XkbCommonSupport REQUIRED PRIVATE)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
2021-04-01 00:28:01 +00:00
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(CMakePackageConfigHelpers)
include(FeatureSummary)
include(GenerateExportHeader)
include(KDEClangFormat)
2021-04-06 11:39:27 +00:00
include(ECMQtDeclareLoggingCategory)
2021-04-01 00:28:01 +00:00
find_package(WaylandScanner)
find_package(QtWaylandScanner)
find_package(Wayland 1.3 COMPONENTS Client Server)
find_package(WaylandProtocols)
set_package_properties(Wayland PROPERTIES
TYPE REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90")
2021-04-01 01:12:40 +00:00
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX LAYERSHELLQT
2021-04-01 00:28:01 +00:00
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/layershellqt_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfigVersion.cmake"
SOVERSION 5)
2021-04-06 11:39:27 +00:00
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
2021-04-01 00:28:01 +00:00
add_subdirectory(src)
add_subdirectory(tests)
2021-04-01 00:45:31 +00:00
set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_LIBDIR}/cmake/LayerShellQt)
install(EXPORT LayerShellQtTargets
NAMESPACE LayerShellQt::
DESTINATION ${CMAKECONFIG_INSTALL_DIR}
2021-04-01 01:12:40 +00:00
FILE LayerShellQtTargets.cmake)
configure_package_config_file(LayerShellQtConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfigVersion.cmake
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
2021-04-01 00:45:31 +00:00
2021-04-01 00:28:01 +00:00
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)