Warning, /frameworks/kjsembed/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.116.0") # handled by release scripts
0004 set(KF_DEP_VERSION "5.115.0") # handled by release scripts
0005 project(KJsEmbed VERSION ${KF_VERSION})
0006 
0007 include(FeatureSummary)
0008 find_package(ECM 5.115.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 
0018 include(ECMSetupVersion)
0019 include(ECMGenerateHeaders)
0020 include(ECMDeprecationSettings)
0021 include(GenerateExportHeader)
0022 include(CMakePackageConfigHelpers)
0023 include(ECMMarkNonGuiExecutable)
0024 
0025 set(REQUIRED_QT_VERSION 5.15.2)
0026 find_package(Qt5 "${REQUIRED_QT_VERSION}" CONFIG REQUIRED UiTools Widgets Xml Svg)
0027 ecm_setup_version(PROJECT VARIABLE_PREFIX KJSEMBED
0028    #VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kjsembed_version.h"
0029                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5JsEmbedConfigVersion.cmake"
0030                         SOVERSION 5)
0031 
0032 find_package(KF5JS ${KF_DEP_VERSION} REQUIRED)
0033 find_package(KF5I18n ${KF_DEP_VERSION} REQUIRED)
0034 find_package(KF5DocTools ${KF_DEP_VERSION})
0035 
0036 ecm_set_disabled_deprecation_versions(
0037     QT 4.99
0038     KF 5.95
0039 )
0040 
0041 # remove definitions set by KDEFrameworkCompilerSettings which we fail to meet
0042 remove_definitions(-DQT_NO_KEYWORDS)
0043 remove_definitions(-DQT_NO_FOREACH)
0044 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
0045 remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
0046 # ideally we would support QT_NO_KEYWORDS, but at least we can do this
0047 add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
0048 
0049 add_definitions(-DTRANSLATION_DOMAIN=\"kjsembed5\")
0050 ki18n_install(po)
0051 if (KF5DocTools_FOUND)
0052     kdoctools_install(po)
0053 endif()
0054 if(KF5DocTools_FOUND)
0055     add_subdirectory(docs)
0056 endif()
0057 add_subdirectory(src)
0058 add_subdirectory(examples/kjsconsole)
0059 
0060 # create a Config.cmake and a ConfigVersion.cmake file and install them
0061 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5JsEmbed")
0062 
0063 configure_package_config_file(
0064   "${CMAKE_CURRENT_SOURCE_DIR}/KF5JsEmbedConfig.cmake.in"
0065   "${CMAKE_CURRENT_BINARY_DIR}/KF5JsEmbedConfig.cmake"
0066   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0067 )
0068 
0069 install(FILES
0070   "${CMAKE_CURRENT_BINARY_DIR}/KF5JsEmbedConfig.cmake"
0071   "${CMAKE_CURRENT_BINARY_DIR}/KF5JsEmbedConfigVersion.cmake"
0072   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0073   COMPONENT Devel
0074 )
0075 
0076 install(EXPORT KF5JsEmbedTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5JsEmbedTargets.cmake NAMESPACE KF5:: )
0077 
0078 #install(FILES
0079 #${CMAKE_CURRENT_BINARY_DIR}/kjsembed_version.h
0080 #DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
0081 #)
0082 
0083 feature_summary(WHAT ALL   FATAL_ON_MISSING_REQUIRED_PACKAGES)