Warning, /libraries/kirigami-addons/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2019 David Edmundson <kde@davidedmundson.co.uk>
0002 # SPDX-License-Identifier: BSD-2-Clause
0003 
0004 cmake_minimum_required(VERSION 3.16)
0005 
0006 project(kirigami-addons VERSION 0.11.90)
0007 
0008 include(FeatureSummary)
0009 
0010 set(AUTOMOC_MOC_OPTIONS -Muri=org.kde.kirigami)
0011 
0012 set(QT_REQUIRED_VERSION "6.4")
0013 set(KF_MIN_VERSION "5.240.0")
0014 set(KF_MAJOR_VERSION "6")
0015 
0016 find_package(ECM ${KF_MIN_VERSION} NO_MODULE)
0017 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
0018 
0019 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
0020 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0021 
0022 include(KDEInstallDirs)
0023 include(KDECMakeSettings)
0024 include(KDECompilerSettings NO_POLICY_SCOPE)
0025 
0026 include(GenerateExportHeader)
0027 include(ECMSetupVersion)
0028 include(ECMGenerateHeaders)
0029 include(CMakePackageConfigHelpers)
0030 include(ECMQtDeclareLoggingCategory)
0031 include(ECMAddQch)
0032 include(ECMQmlModule)
0033 
0034 find_package(Qt6 ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick QuickControls2)
0035 
0036 find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami I18n)
0037 if (BUILD_TESTING)
0038     find_package(Qt6QuickTest ${QT_REQUIRED_VERSION} CONFIG QUIET)
0039 endif()
0040 if (ANDROID)
0041     find_package(Gradle REQUIRED)
0042 endif()
0043 
0044 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6KirigamiAddons")
0045 
0046 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0047 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0048 
0049 configure_package_config_file(
0050     "${CMAKE_CURRENT_SOURCE_DIR}/KFKirigamiAddonsConfig.cmake.in"
0051     "${CMAKE_CURRENT_BINARY_DIR}/KF6KirigamiAddonsConfig.cmake"
0052     INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0053     PATH_VARS CMAKE_INSTALL_PREFIX
0054 )
0055 ecm_setup_version(${PROJECT_VERSION}
0056     VARIABLE_PREFIX KIRIGAMIADDONS
0057     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kirigamiaddons_version.h"
0058     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6KirigamiAddonsConfigVersion.cmake"
0059 )
0060 
0061 add_subdirectory(src)
0062 
0063 if (BUILD_TESTING AND BUILD_SHARED_LIBS)
0064     add_subdirectory(autotests)
0065 endif()
0066 
0067 option(BUILD_EXAMPLES OFF)
0068 
0069 if (BUILD_EXAMPLES)
0070     add_subdirectory(examples)
0071 endif()
0072 
0073 install(FILES
0074     "${CMAKE_CURRENT_BINARY_DIR}/KF6KirigamiAddonsConfig.cmake"
0075     "${CMAKE_CURRENT_BINARY_DIR}/KF6KirigamiAddonsConfigVersion.cmake"
0076     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0077     COMPONENT Devel
0078 )
0079 
0080 ki18n_install(po)
0081 
0082 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)