Warning, /frameworks/kunitconversion/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 set(KF_DEP_VERSION "5.249.0") # handled by release scripts 0005 project(KUnitConversion VERSION ${KF_VERSION}) 0006 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 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0011 0012 include(KDEInstallDirs) 0013 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0014 include(KDECMakeSettings) 0015 include(ECMGenerateExportHeader) 0016 include(ECMSetupVersion) 0017 include(ECMGenerateHeaders) 0018 include(ECMQtDeclareLoggingCategory) 0019 include(ECMDeprecationSettings) 0020 0021 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") 0022 0023 set(REQUIRED_QT_VERSION 6.5.0) 0024 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Network) 0025 0026 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6UnitConversion") 0027 0028 set(kunitconversion_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/kunitconversion_version.h") 0029 ecm_setup_version(PROJECT VARIABLE_PREFIX KUNITCONVERSION 0030 VERSION_HEADER "${kunitconversion_version_header}" 0031 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6UnitConversionConfigVersion.cmake" 0032 SOVERSION 6) 0033 0034 # QCH 0035 include(ECMAddQch) 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 if (BUILD_QCH) 0039 ecm_install_qch_export( 0040 TARGETS KF6UnitConversion_QCH 0041 FILE KF6UnitConversionQchTargets.cmake 0042 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0043 COMPONENT Devel 0044 ) 0045 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6UnitConversionQchTargets.cmake\")") 0046 endif() 0047 0048 # I18n 0049 find_package(KF6I18n ${KF_DEP_VERSION} REQUIRED) 0050 add_definitions(-DTRANSLATION_DOMAIN=\"kunitconversion6\") 0051 ki18n_install(po) 0052 0053 ecm_set_disabled_deprecation_versions( 0054 QT 6.5 0055 KF 5.240 0056 ) 0057 0058 add_subdirectory(src) 0059 if (BUILD_TESTING) 0060 add_subdirectory(autotests) 0061 endif() 0062 # create a Config.cmake and a ConfigVersion.cmake file and install them 0063 include(CMakePackageConfigHelpers) 0064 configure_package_config_file( 0065 "${CMAKE_CURRENT_SOURCE_DIR}/KF6UnitConversionConfig.cmake.in" 0066 "${CMAKE_CURRENT_BINARY_DIR}/KF6UnitConversionConfig.cmake" 0067 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0068 ) 0069 install(FILES 0070 "${CMAKE_CURRENT_BINARY_DIR}/KF6UnitConversionConfig.cmake" 0071 "${CMAKE_CURRENT_BINARY_DIR}/KF6UnitConversionConfigVersion.cmake" 0072 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0073 COMPONENT Devel 0074 ) 0075 install(EXPORT KF6UnitConversionTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF6UnitConversionTargets.cmake NAMESPACE KF6:: ) 0076 install(FILES 0077 ${kunitconversion_version_header} 0078 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KUnitConversion COMPONENT Devel 0079 ) 0080 0081 include(ECMFeatureSummary) 0082 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)