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 "6.0.0") # handled by release scripts
0004 project(Attica VERSION ${KF_VERSION})
0005 
0006 # ECM setup
0007 include(FeatureSummary)
0008 find_package(ECM 5.249.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(ECMGeneratePkgConfigFile)
0021 include(ECMCheckOutboundLicense)
0022 include(ECMSetupVersion)
0023 include(ECMGenerateHeaders)
0024 include(CMakePackageConfigHelpers) # Used to create CMake config files
0025 include(ECMQtDeclareLoggingCategory)
0026 include(ECMDeprecationSettings)
0027 include(ECMAddQch)
0028 
0029 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
0030 
0031 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0032 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0033 
0034 set(attica_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/attica_version.h")
0035 ecm_setup_version(PROJECT
0036     VARIABLE_PREFIX ATTICA
0037     VERSION_HEADER "${attica_version_header}"
0038     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6AtticaConfigVersion.cmake"
0039     SOVERSION 6)
0040 
0041 # Dependencies
0042 set(REQUIRED_QT_VERSION 6.5.0)
0043 
0044 # Required Qt components to build this framework
0045 find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Network)
0046 
0047 set(ATTICA_LIB_SONAME KF6Attica)
0048 
0049 # Enable static build
0050 option(ATTICA_STATIC_BUILD "Build a static library" Off)
0051 
0052 ecm_set_disabled_deprecation_versions(
0053     QT 6.5
0054 )
0055 
0056 add_subdirectory(src)
0057 
0058 # Enable unit testing
0059 if (BUILD_TESTING)
0060     add_subdirectory(autotests)
0061     add_subdirectory(tests)
0062 endif ()
0063 
0064 # Create a Config.cmake and a ConfigVersion.cmake file and install them
0065 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Attica")
0066 
0067 # Create the CMake Config files
0068 if (BUILD_QCH)
0069     ecm_install_qch_export(
0070         TARGETS KF6Attica_QCH
0071         FILE KF6AtticaQchTargets.cmake
0072         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0073         COMPONENT Devel
0074     )
0075     set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6AtticaQchTargets.cmake\")")
0076 endif()
0077 
0078 configure_package_config_file(
0079     "${CMAKE_CURRENT_SOURCE_DIR}/KF6AtticaConfig.cmake.in"
0080     "${CMAKE_CURRENT_BINARY_DIR}/KF6AtticaConfig.cmake"
0081     INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0082 )
0083 
0084 install(FILES
0085             "${CMAKE_CURRENT_BINARY_DIR}/KF6AtticaConfig.cmake"
0086             "${CMAKE_CURRENT_BINARY_DIR}/KF6AtticaConfigVersion.cmake"
0087         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0088         COMPONENT Devel)
0089 
0090 install(EXPORT KF6AtticaTargets
0091         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0092         FILE KF6AtticaTargets.cmake
0093         NAMESPACE KF6::)
0094 
0095 install(FILES "${attica_version_header}"
0096         DESTINATION "${KDE_INSTALL_INCLUDEDIR_KF}/Attica"
0097         COMPONENT Devel)
0098 
0099 include(ECMFeatureSummary)
0100 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0101 
0102 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)