Warning, /frameworks/kcrash/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.97.0") # handled by release scripts
0004 set(KF_DEP_VERSION "5.97.0") # handled by release scripts
0005 project(KCrash VERSION ${KF_VERSION})
0006 
0007 include(FeatureSummary)
0008 find_package(ECM 5.97.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(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
0016 include(KDECMakeSettings)
0017 include(KDEGitCommitHooks)
0018 include(ECMDeprecationSettings)
0019 
0020 set(REQUIRED_QT_VERSION 5.15.2)
0021 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core)
0022 
0023 if (UNIX AND NOT APPLE AND NOT ANDROID)
0024     option(WITH_X11 "Build with X11 integration" ON)
0025 else()
0026     set(WITH_X11 OFF)
0027 endif()
0028 
0029 if (WITH_X11)
0030     find_package(X11 REQUIRED)
0031     if (QT_MAJOR_VERSION STREQUAL "5")
0032         find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED X11Extras)
0033     endif()
0034     set(HAVE_X11 TRUE)
0035 endif()
0036 find_package(Qt${QT_MAJOR_VERSION}Test ${REQUIRED_QT_VERSION} CONFIG REQUIRED)
0037 include(GenerateExportHeader)
0038 include(ECMSetupVersion)
0039 include(ECMGenerateHeaders)
0040 include(ECMAddQch)
0041 include(ECMQtDeclareLoggingCategory)
0042 
0043 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
0044 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
0045 
0046 ecm_setup_version(PROJECT VARIABLE_PREFIX KCrash
0047                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/kcrash_version.h"
0048                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CrashConfigVersion.cmake"
0049                         SOVERSION 5)
0050 
0051 find_package(KF5CoreAddons ${KF_DEP_VERSION} REQUIRED)
0052 find_package(KF5WindowSystem ${KF_DEP_VERSION} REQUIRED)
0053 
0054 set(KCRASH_CORE_PATTERN_RAISE_DEFAULT ON)
0055 
0056 option(KCRASH_CORE_PATTERN_RAISE
0057     "Enables raising signals to kernel core patterns (iff the pattern is a process). You may wish to not install drkonqi if this can cause a UI conflict."
0058     ${KCRASH_CORE_PATTERN_RAISE_DEFAULT})
0059 add_feature_info("Core Pattern Raising"
0060     KCRASH_CORE_PATTERN_RAISE
0061     "Raising signals to kernel core patterns (iff the pattern is a process). You may wish to not install drkonqi if this can cause a UI conflict.")
0062 
0063 ecm_set_disabled_deprecation_versions(
0064     QT 5.15.2
0065     KF 5.95.0
0066 )
0067 
0068 add_subdirectory(src)
0069 if (BUILD_TESTING)
0070     add_subdirectory(autotests)
0071 endif()
0072 
0073 # create a Config.cmake and a ConfigVersion.cmake file and install them
0074 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Crash")
0075 
0076 if (BUILD_QCH)
0077     ecm_install_qch_export(
0078         TARGETS KF5Crash_QCH
0079         FILE KF5CrashQchTargets.cmake
0080         DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0081         COMPONENT Devel
0082     )
0083     set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5CrashQchTargets.cmake\")")
0084 endif()
0085 
0086 include(CMakePackageConfigHelpers)
0087 
0088 configure_package_config_file(
0089   "${CMAKE_CURRENT_SOURCE_DIR}/KF5CrashConfig.cmake.in"
0090   "${CMAKE_CURRENT_BINARY_DIR}/KF5CrashConfig.cmake"
0091   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
0092 )
0093 
0094 install(FILES
0095   "${CMAKE_CURRENT_BINARY_DIR}/KF5CrashConfig.cmake"
0096   "${CMAKE_CURRENT_BINARY_DIR}/KF5CrashConfigVersion.cmake"
0097   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
0098   COMPONENT Devel
0099 )
0100 
0101 install(EXPORT KF5CrashTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5CrashTargets.cmake NAMESPACE KF5:: )
0102 
0103 install(FILES
0104    ${CMAKE_CURRENT_BINARY_DIR}/src/kcrash_version.h
0105   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCrash COMPONENT Devel
0106 )
0107 
0108 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0109 
0110 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)