Warning, /utilities/kate/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # 3.16 is required for the ECM version we require
0002 cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
0003
0004 # KDE Applications version, managed by release script.
0005 set(RELEASE_SERVICE_VERSION_MAJOR "24")
0006 set(RELEASE_SERVICE_VERSION_MINOR "04")
0007 set(RELEASE_SERVICE_VERSION_MICRO "70")
0008 set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0009
0010 project(kate VERSION ${RELEASE_SERVICE_VERSION})
0011
0012 # KF6 only
0013 set(QT_MIN_VERSION "6.5.0")
0014 set(KF5_DEP_VERSION "5.240.0")
0015 set(QT_MAJOR_VERSION "6")
0016
0017 # We need some parts of the ECM CMake helpers.
0018 find_package(ECM ${KF5_DEP_VERSION} QUIET REQUIRED NO_MODULE)
0019
0020 # We append to the module path so modules can be overridden from the command line.
0021 list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0022
0023 include(KDECompilerSettings NO_POLICY_SCOPE)
0024 include(KDEInstallDirs)
0025 include(KDECMakeSettings)
0026 include(KDEClangFormat)
0027 include(KDEGitCommitHooks)
0028
0029 include(ECMOptionalAddSubdirectory)
0030 include(ECMAddAppIcon)
0031 include(ECMInstallIcons)
0032 include(ECMDeprecationSettings)
0033
0034 include(FeatureSummary)
0035 include(FindIntl)
0036
0037 # Required here so that the version comparison below works
0038 find_package(Qt6Widgets ${QT_MIN_VERSION} CONFIG REQUIRED)
0039 find_package(Qt6Concurrent ${QT_MIN_VERSION} CONFIG REQUIRED)
0040
0041 # Required here so that the ki18n_install/kdoctools_install calls work.
0042 find_package(KF6 ${KF5_DEP_VERSION}
0043 REQUIRED COMPONENTS
0044 I18n
0045 CoreAddons
0046 GuiAddons
0047 Crash
0048 IconThemes
0049 TextEditor
0050 OPTIONAL_COMPONENTS
0051 DocTools
0052 )
0053
0054 if (NOT WIN32 AND NOT HAIKU)
0055 find_package(Intl)
0056 set_package_properties(Intl PROPERTIES TYPE REQUIRED
0057 URL "http://gnuwin32.sourceforge.net/packages/libintl.htm"
0058 PURPOSE "Needed for building kate unless glibc is the system libc implementation"
0059 )
0060 endif()
0061
0062 # define which offscreen platform plugin to use for tests
0063 # windows has issues with offscreen tests in the CI
0064 set(OFFSCREEN_QPA)
0065 if(NOT WIN32)
0066 set(OFFSCREEN_QPA "-platform" "offscreen")
0067 endif()
0068
0069 option(BUILD_PCH "Enable PCH support" ON)
0070 if (BUILD_PCH)
0071 add_subdirectory(pch)
0072 endif()
0073
0074 # addons for Kate
0075 ecm_optional_add_subdirectory(addons)
0076
0077 # the Kate & KWrite applications
0078 ecm_optional_add_subdirectory(apps)
0079
0080 # our documentation
0081 ecm_optional_add_subdirectory(doc)
0082
0083 ki18n_install(po)
0084 if(KF6DocTools_FOUND)
0085 kdoctools_install(po)
0086 endif()
0087
0088 feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0089
0090 # add clang-format target for all our real source files
0091 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0092 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0093 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)