Warning, /frameworks/kcodecs/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(KCodecs VERSION ${KF_VERSION}) 0005 0006 include(FeatureSummary) 0007 find_package(ECM 5.249.0 NO_MODULE) 0008 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") 0009 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) 0010 0011 0012 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0013 0014 include(KDEInstallDirs) 0015 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0016 include(KDECMakeSettings) 0017 include(KDEGitCommitHooks) 0018 include(ECMQtDeclareLoggingCategory) 0019 include(ECMDeprecationSettings) 0020 0021 set(REQUIRED_QT_VERSION 6.5.0) 0022 find_package(Qt6Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) 0023 0024 find_package(Gperf REQUIRED) 0025 0026 include(ECMGenerateExportHeader) 0027 include(CMakePackageConfigHelpers) 0028 include(ECMSetupVersion) 0029 include(ECMGenerateHeaders) 0030 0031 include(ECMPoQmTools) 0032 include(ECMAddQch) 0033 0034 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") 0035 0036 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) 0037 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0038 0039 set(kcodecs_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/kcodecs_version.h") 0040 ecm_setup_version(PROJECT VARIABLE_PREFIX KCODECS 0041 VERSION_HEADER "${kcodecs_version_header}" 0042 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6CodecsConfigVersion.cmake" 0043 SOVERSION 6) 0044 0045 ecm_install_po_files_as_qm(poqm) 0046 0047 ecm_set_disabled_deprecation_versions( 0048 QT 6.5 0049 ) 0050 0051 add_subdirectory(src) 0052 0053 if (BUILD_TESTING) 0054 add_subdirectory(autotests) 0055 endif() 0056 0057 # create a Config.cmake and a ConfigVersion.cmake file and install them 0058 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Codecs") 0059 0060 if (BUILD_QCH) 0061 ecm_install_qch_export( 0062 TARGETS KF6Codecs_QCH 0063 FILE KF6CodecsQchTargets.cmake 0064 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0065 COMPONENT Devel 0066 ) 0067 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6CodecsQchTargets.cmake\")") 0068 endif() 0069 0070 configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF6CodecsConfig.cmake.in" 0071 "${CMAKE_CURRENT_BINARY_DIR}/KF6CodecsConfig.cmake" 0072 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0073 ) 0074 0075 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF6CodecsConfig.cmake" 0076 "${CMAKE_CURRENT_BINARY_DIR}/KF6CodecsConfigVersion.cmake" 0077 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0078 COMPONENT Devel ) 0079 0080 install(EXPORT KF6CodecsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF6CodecsTargets.cmake NAMESPACE KF6:: ) 0081 0082 install(FILES ${kcodecs_version_header} 0083 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCodecs COMPONENT Devel) 0084 0085 include(ECMFeatureSummary) 0086 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0087 0088 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)