init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
158
Telegram/ThirdParty/kcoreaddons/CMakeLists.txt
vendored
Normal file
158
Telegram/ThirdParty/kcoreaddons/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(KF_VERSION "5.116.0") # handled by release scripts
|
||||
project(KCoreAddons VERSION ${KF_VERSION})
|
||||
|
||||
include(FeatureSummary)
|
||||
find_package(ECM 5.116.0 NO_MODULE)
|
||||
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
|
||||
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
|
||||
include(KDEGitCommitHooks)
|
||||
|
||||
include(ECMGenerateExportHeader)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(ECMSetupVersion)
|
||||
include(ECMGenerateHeaders)
|
||||
include(ECMQtDeclareLoggingCategory)
|
||||
include(ECMAddQch)
|
||||
include(ECMSetupQtPluginMacroNames)
|
||||
include(ECMDeprecationSettings)
|
||||
|
||||
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
|
||||
|
||||
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
|
||||
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
|
||||
|
||||
set(REQUIRED_QT_VERSION 5.15.2)
|
||||
find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core)
|
||||
|
||||
ecm_setup_qtplugin_macro_names(
|
||||
JSON_NONE
|
||||
"K_PLUGIN_FACTORY"
|
||||
"K_PLUGIN_CLASS"
|
||||
JSON_ARG2
|
||||
"K_PLUGIN_FACTORY_WITH_JSON"
|
||||
"K_PLUGIN_CLASS_WITH_JSON"
|
||||
CONFIG_CODE_VARIABLE
|
||||
PACKAGE_SETUP_AUTOMOC_VARIABLES
|
||||
)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
# Configure checks for kdirwatch
|
||||
find_package(FAM)
|
||||
|
||||
set_package_properties(FAM PROPERTIES
|
||||
PURPOSE "Provides file alteration notification facilities using a separate service. FAM provides additional support for NFS.")
|
||||
|
||||
set(HAVE_FAM ${FAM_FOUND})
|
||||
|
||||
option(ENABLE_INOTIFY "Try to use inotify for directory monitoring" ON)
|
||||
if(ENABLE_INOTIFY)
|
||||
# Find libinotify
|
||||
find_package(Inotify)
|
||||
set_package_properties(Inotify PROPERTIES
|
||||
PURPOSE "Filesystem alteration notifications using inotify")
|
||||
set(HAVE_SYS_INOTIFY_H ${Inotify_FOUND})
|
||||
else()
|
||||
set(HAVE_SYS_INOTIFY_H FALSE)
|
||||
endif()
|
||||
|
||||
set(HAVE_PROCSTAT FALSE)
|
||||
string(REGEX MATCH "[Bb][Ss][Dd]" BSDLIKE ${CMAKE_SYSTEM_NAME})
|
||||
if (BSDLIKE)
|
||||
option(ENABLE_PROCSTAT "Try to use libprocstat for process information (for BSD-like systems)" ON)
|
||||
if (ENABLE_PROCSTAT)
|
||||
# Find libprocstat
|
||||
find_package(Procstat)
|
||||
set_package_properties(Procstat PROPERTIES
|
||||
PURPOSE "Process information using libprocstat")
|
||||
set(HAVE_PROCSTAT ${PROCSTAT_FOUND})
|
||||
endif()
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set_package_properties(Procstat PROPERTIES
|
||||
TYPE REQUIRED
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32) # never relevant there
|
||||
find_package(Qt${QT_MAJOR_VERSION}DBus ${QT_MIN_VERSION} CONFIG)
|
||||
set(HAVE_QTDBUS ${Qt${QT_MAJOR_VERSION}DBus_FOUND})
|
||||
add_feature_info(XDGPortalDragAndDrop HAVE_QTDBUS "Drag and Drop support via xdg-desktop-portal requies QtDBus")
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_package(UDev) # Used by KFilesystemType
|
||||
set(HAVE_UDEV ${UDev_FOUND})
|
||||
endif()
|
||||
|
||||
configure_file(src/lib/io/config-kdirwatch.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/lib/io/config-kdirwatch.h)
|
||||
|
||||
configure_file(src/lib/io/config-kfilesystemtype.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/lib/io/config-kfilesystemtype.h)
|
||||
|
||||
include(ECMPoQmTools)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
|
||||
ecm_install_po_files_as_qm(poqm)
|
||||
|
||||
kde_enable_exceptions()
|
||||
|
||||
|
||||
ecm_set_disabled_deprecation_versions(
|
||||
QT 5.14.0 # Not 5.15 because of qsrand
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
||||
if (BUILD_TESTING)
|
||||
add_subdirectory(autotests)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# create a Config.cmake and a ConfigVersion.cmake file and install them
|
||||
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5CoreAddons")
|
||||
|
||||
if (BUILD_QCH)
|
||||
ecm_install_qch_export(
|
||||
TARGETS KF5CoreAddons_QCH
|
||||
FILE KF5CoreAddonsQchTargets.cmake
|
||||
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||
COMPONENT Devel
|
||||
)
|
||||
set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5CoreAddonsQchTargets.cmake\")")
|
||||
endif()
|
||||
|
||||
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF5CoreAddonsConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfig.cmake"
|
||||
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/KF5CoreAddonsMacros.cmake"
|
||||
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||
COMPONENT Devel )
|
||||
|
||||
install(EXPORT KF5CoreAddonsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5CoreAddonsTargets.cmake NAMESPACE KF5:: )
|
||||
install(EXPORT KF5CoreAddonsToolingTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5CoreAddonsToolingTargets.cmake NAMESPACE KF5:: )
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h
|
||||
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCoreAddons COMPONENT Devel)
|
||||
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
||||
Reference in New Issue
Block a user