Warning, /maui/mauikit-accounts/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
0002 #
0003 # SPDX-License-Identifier: BSD-2-Clause
0004 
0005 cmake_minimum_required(VERSION 3.16)
0006 
0007 set(KF5_VERSION "5.70.0")
0008 set(REQUIRED_QT_VERSION 5.15.0)
0009 
0010 set(CMAKE_CXX_STANDARD 17)
0011 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0012 
0013 set(CMAKE_INCLUDE_CURRENT_DIR ON)
0014 set(CMAKE_AUTOUIC ON)
0015 set(CMAKE_AUTOMOC ON)
0016 set(CMAKE_AUTORCC ON)
0017 
0018 set(AUTOMOC_MOC_OPTIONS -Muri=org.mauikit.accounts)
0019 
0020 project(Accounts LANGUAGES CXX VERSION 2.2.0)
0021 
0022 find_package(ECM ${KF5_VERSION} NO_MODULE)
0023 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0024 
0025 option(QUICK_COMPILER "Use QtQuick compiler to improve performance" TRUE)
0026 
0027 include(GenerateExportHeader)
0028 include(GNUInstallDirs)
0029 include(KDEInstallDirs)
0030 include(KDECMakeSettings)
0031 include(KDECompilerSettings)
0032 include(FeatureSummary)
0033 include(ECMPoQmTools)
0034 include(ECMSetupVersion)
0035 include(ECMGenerateQmlTypes)
0036 include(CMakePackageConfigHelpers)
0037 #include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0038 include(KDEPackageAppTemplates)
0039 
0040 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/MauiKitAccounts")
0041 
0042 configure_package_config_file(
0043     "${CMAKE_CURRENT_SOURCE_DIR}/MauiKitAccountsConfig.cmake.in"
0044     "${CMAKE_CURRENT_BINARY_DIR}/MauiKitAccountsConfig.cmake"
0045     INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0046     PATH_VARS KF5_INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX
0047 )
0048 
0049 install(FILES
0050     "${CMAKE_CURRENT_BINARY_DIR}/MauiKitAccountsConfigVersion.cmake"
0051     "${CMAKE_CURRENT_BINARY_DIR}/MauiKitAccountsConfig.cmake"
0052     DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0053     COMPONENT Devel
0054 )
0055 
0056     install(EXPORT MauiKitAccountsTargets
0057         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0058         FILE MauiKitAccountsTargets.cmake
0059         NAMESPACE MauiKit::)
0060         
0061 ecm_setup_version(${PROJECT_VERSION}
0062     VARIABLE_PREFIX Accounts
0063     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/accounts_version.h"
0064     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/MauiKitAccountsConfigVersion.cmake"
0065     SOVERSION ${PROJECT_VERSION_MAJOR}
0066 )
0067 
0068 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/accounts_version.h"
0069     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/MauiKit/Accounts
0070     COMPONENT Devel)
0071 
0072 if(ANDROID)
0073     find_package(Qt5 REQUIRED COMPONENTS AndroidExtras)
0074     find_package(Gradle REQUIRED)
0075 elseif(UNIX)
0076     find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS Config)
0077 endif()
0078 
0079 find_package(Qt5 ${REQUIRED_QT_VERSION} COMPONENTS Core Quick Sql Network REQUIRED)
0080 find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS I18n CoreAddons)
0081 find_package(MauiKit)
0082 
0083 if(QUICK_COMPILER)
0084         find_package(Qt5QuickCompiler)
0085         set_package_properties(Qt5QuickCompiler PROPERTIES
0086                 DESCRIPTION "Compile QML at build time"
0087                 TYPE OPTIONAL
0088         )
0089 endif()
0090     
0091 add_subdirectory(src)
0092 
0093 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)