Warning, /frameworks/attica/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 set(KF_VERSION "5.105.0") # handled by release scripts
0004 project(Attica VERSION ${KF_VERSION})
0005 
0006 # ECM setup
0007 include(FeatureSummary)
0008 find_package(ECM 5.104.0  NO_MODULE)
0009 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
0010 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
0011 
0012 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0013 
0014 include(KDEInstallDirs)
0015 include(KDECMakeSettings)
0016 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0017 include(KDEGitCommitHooks)
0018 
0019 include(ECMGenerateExportHeader)
0020 include(ECMCheckOutboundLicense)
0021 include(ECMSetupVersion)
0022 include(ECMGenerateHeaders)
0023 include(CMakePackageConfigHelpers) # Used to create CMake config files
0024 include(ECMQtDeclareLoggingCategory)
0025 include(ECMDeprecationSettings)
0026 include(ECMAddQch)
0027 
0028 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0029 
0030 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0031 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0032 
0033 ecm_setup_version(PROJECT
0034     VARIABLE_PREFIX ATTICA
0035     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/attica_version.h"
0036     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5AtticaConfigVersion.cmake"
0037     SOVERSION 5)
0038 
0039 # Dependencies
0040 set(REQUIRED_QT_VERSION 5.15.2)
0041 
0042 # Required Qt components to build this framework
0043 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Network)
0044 
0045 set(ATTICA_LIB_SONAME KF5Attica)
0046 
0047 # Enable static build
0048 option(ATTICA_STATIC_BUILD "Build a static library" Off)
0049 
0050 ecm_set_disabled_deprecation_versions(
0051     QT 5.15.2
0052 )
0053 
0054 add_subdirectory(src)
0055 
0056 # Enable unit testing
0057 if (BUILD_TESTING)
0058     add_subdirectory(autotests)
0059     add_subdirectory(tests)
0060 endif ()
0061 
0062 # Create a Config.cmake and a ConfigVersion.cmake file and install them
0063 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Attica")
0064 
0065 # Create the CMake Config files
0066 if (BUILD_QCH)
0067     ecm_install_qch_export(
0068         TARGETS KF5Attica_QCH
0069         FILE KF5AtticaQchTargets.cmake
0070         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0071         COMPONENT Devel
0072     )
0073     set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5AtticaQchTargets.cmake\")")
0074 endif()
0075 
0076 configure_package_config_file(
0077     "${CMAKE_CURRENT_SOURCE_DIR}/KF5AtticaConfig.cmake.in"
0078     "${CMAKE_CURRENT_BINARY_DIR}/KF5AtticaConfig.cmake"
0079     INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0080 )
0081 
0082 install(FILES
0083             "${CMAKE_CURRENT_BINARY_DIR}/KF5AtticaConfig.cmake"
0084             "${CMAKE_CURRENT_BINARY_DIR}/KF5AtticaConfigVersion.cmake"
0085         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0086         COMPONENT Devel)
0087 
0088 install(EXPORT KF5AtticaTargets
0089         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0090         FILE KF5AtticaTargets.cmake
0091         NAMESPACE KF5::)
0092 
0093 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/attica_version.h"
0094         DESTINATION "${KDE_INSTALL_INCLUDEDIR_KF}/Attica"
0095         COMPONENT Devel)
0096 
0097 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0098 
0099 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)