Warning, /frameworks/kross/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.101.0") # handled by release scripts
0004 set(KF_DEP_VERSION "5.101.0") # handled by release scripts
0005 project(Kross VERSION ${KF_VERSION})
0006 
0007 include(FeatureSummary)
0008 find_package(ECM 5.101.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 
0013 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0014 
0015 
0016 include(GenerateExportHeader)
0017 include(CMakePackageConfigHelpers)
0018 include(ECMSetupVersion)
0019 include(ECMGenerateHeaders)
0020 include(ECMGenerateExportHeader)
0021 include(ECMDeprecationSettings)
0022 include(ECMQtDeclareLoggingCategory)
0023 
0024 include(KDEInstallDirs)
0025 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0026 include(KDECMakeSettings)
0027 
0028 ecm_setup_version(PROJECT VARIABLE_PREFIX KROSS
0029                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kross_version.h"
0030                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KrossConfigVersion.cmake"
0031                         SOVERSION 5)
0032 
0033 set(REQUIRED_QT_VERSION 5.15.2)
0034 find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Script Xml Widgets UiTools)
0035 
0036 
0037 find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
0038 set_package_properties(Qt5Test PROPERTIES
0039    PURPOSE "Required for tests"
0040    TYPE OPTIONAL
0041    )
0042 add_feature_info("Qt5Test" Qt5Test_FOUND "Required for building tests")
0043 if (NOT Qt5Test_FOUND)
0044    set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
0045 endif()
0046 
0047 find_package(KF5Completion ${KF_DEP_VERSION} REQUIRED)
0048 find_package(KF5CoreAddons ${KF_DEP_VERSION} REQUIRED)
0049 find_package(KF5I18n ${KF_DEP_VERSION} REQUIRED)
0050 find_package(KF5IconThemes ${KF_DEP_VERSION} REQUIRED)
0051 find_package(KF5KIO ${KF_DEP_VERSION} REQUIRED)
0052 find_package(KF5Parts ${KF_DEP_VERSION} REQUIRED)
0053 find_package(KF5WidgetsAddons ${KF_DEP_VERSION} REQUIRED)
0054 find_package(KF5XmlGui ${KF_DEP_VERSION} REQUIRED)
0055 find_package(KF5DocTools ${KF_DEP_VERSION})
0056 
0057 # remove definitions set by KDEFrameworkCompilerSettings which we fail to meet
0058 remove_definitions(-DQT_NO_KEYWORDS)
0059 remove_definitions(-DQT_NO_FOREACH)
0060 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
0061 # ideally we would support QT_NO_KEYWORDS, but at least we can do this
0062 add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
0063 
0064 ecm_set_disabled_deprecation_versions(
0065     QT 5.15.2
0066 )
0067 add_definitions(-DTRANSLATION_DOMAIN=\"kross5\")
0068 ki18n_install(po)
0069 if (KF5DocTools_FOUND)
0070     kdoctools_install(po)
0071 endif()
0072 if (KF5DocTools_FOUND)
0073     add_subdirectory(docs)
0074 endif()
0075 
0076 add_subdirectory(src)
0077 if (BUILD_TESTING)
0078 add_subdirectory(autotests)
0079 endif()
0080 
0081 # create a Config.cmake and a ConfigVersion.cmake file and install them
0082 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Kross")
0083 
0084 configure_package_config_file(
0085   "${CMAKE_CURRENT_SOURCE_DIR}/KF5KrossConfig.cmake.in"
0086   "${CMAKE_CURRENT_BINARY_DIR}/KF5KrossConfig.cmake"
0087   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0088 )
0089 
0090 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kross_version.h
0091         DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel)
0092 
0093 install(FILES
0094   "${CMAKE_CURRENT_BINARY_DIR}/KF5KrossConfig.cmake"
0095   "${CMAKE_CURRENT_BINARY_DIR}/KF5KrossConfigVersion.cmake"
0096   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0097   COMPONENT Devel
0098 )
0099 
0100 install(EXPORT KF5KrossTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5KrossTargets.cmake NAMESPACE KF5::)
0101 
0102 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)