Warning, /system/ksystemlog/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required (VERSION 3.16 FATAL_ERROR)
0002 
0003 # KDE Application Version, managed by release script
0004 set (RELEASE_SERVICE_VERSION_MAJOR "23")
0005 set (RELEASE_SERVICE_VERSION_MINOR "03")
0006 set (RELEASE_SERVICE_VERSION_MICRO "70")
0007 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0008 
0009 project(KSystemlog VERSION ${RELEASE_SERVICE_VERSION})
0010 
0011 set (QT_MIN_VERSION "5.15.2")
0012 set (KF5_MIN_VERSION "5.100.0")
0013 
0014 find_package (ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0015 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}  ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
0016 
0017 add_definitions(-DTRANSLATION_DOMAIN="ksystemlog")
0018 
0019 include(ECMSetupVersion)
0020 include(KDEInstallDirs)
0021 include(KDECompilerSettings NO_POLICY_SCOPE)
0022 include(KDECMakeSettings)
0023 include(FeatureSummary)
0024 include(ECMQtDeclareLoggingCategory)
0025 include(ECMDeprecationSettings)
0026 include(KDEGitCommitHooks)
0027 include(KDEClangFormat)
0028 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
0029 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0030 
0031 
0032 
0033 
0034 ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KSYSTEMLOG
0035                   VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/ksystemlog_version.h")
0036 
0037 find_package (Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
0038     Concurrent
0039     Core
0040     Network
0041     Widgets
0042     Test
0043     PrintSupport
0044 )
0045 if (QT_MAJOR_VERSION STREQUAL "6")
0046     find_package(Qt6Core5Compat)
0047 endif()
0048 
0049 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0050     XmlGui
0051     CoreAddons
0052     WidgetsAddons
0053     ItemViews
0054     KIO
0055     Config
0056     Archive
0057     I18n
0058     Completion
0059     TextWidgets
0060 )
0061 find_package(KF5DocTools ${KF5_MIN_VERSION})
0062 set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
0063     "Tools to generate documentation"
0064     TYPE OPTIONAL
0065 )
0066 
0067 find_package(Journald)
0068 find_package(Audit)
0069 
0070 include(CheckIncludeFile)
0071 include(CheckIncludeFiles)
0072 include(CheckSymbolExists)
0073 include(CheckFunctionExists)
0074 include(CheckLibraryExists)
0075 include(CheckTypeSize)
0076 include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
0077 
0078 # Help Eclipse to parse errors more efficiently
0079 if(CMAKE_COMPILER_IS_GNUCC)
0080     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
0081 endif(CMAKE_COMPILER_IS_GNUCC)
0082 if(CMAKE_COMPILER_IS_GNUCXX)
0083     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
0084 endif(CMAKE_COMPILER_IS_GNUCXX)
0085 
0086 
0087 add_custom_target(
0088     pkg
0089     COMMAND ./build-package.sh
0090 )
0091 
0092 ##
0093 # To specify a different install prefix, use :
0094 # cmake -D CMAKE_INSTALL_PREFIX=build .
0095 #
0096 # To help Eclipse discover include paths, use :
0097 # cmake -D CMAKE_VERBOSE_MAKEFILE=true .
0098 ##
0099 
0100 if (${JOURNALD_FOUND})
0101     add_definitions(-DHAVE_JOURNALD)
0102 endif (${JOURNALD_FOUND})
0103 
0104 if (${AUDIT_FOUND})
0105     add_definitions(-DHAVE_AUDIT)
0106 endif (${AUDIT_FOUND})
0107 
0108 ########### Subfolders ##########
0109 ecm_set_disabled_deprecation_versions(QT 5.15.2
0110     KF 5.100
0111 )
0112 
0113 
0114 add_subdirectory(src)
0115 
0116 add_subdirectory(autotests)
0117 
0118 find_package(KF5I18n CONFIG REQUIRED)
0119 if (KF5DocTools_FOUND)
0120     kdoctools_install(po)
0121     add_subdirectory(doc)
0122 endif()
0123 
0124 ki18n_install(po)
0125 ecm_qt_install_logging_categories(EXPORT KSYSTEMLOG FILE ksystemlog.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
0126 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0127 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)