Warning, /utilities/filelight/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #######################################################################
0002 # SPDX-FileCopyrightText: 2008-2014 Martin Sandsmark <martin.sandsmark@kde.org>
0003 # SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
0004 #
0005 # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 #######################################################################
0007 
0008 # KDE Application Version, managed by release script
0009 set(RELEASE_SERVICE_VERSION_MAJOR "24")
0010 set(RELEASE_SERVICE_VERSION_MINOR "01")
0011 set(RELEASE_SERVICE_VERSION_MICRO "95")
0012 set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0013 set(FILELIGHT_VERSION ${RELEASE_SERVICE_VERSION})
0014 # minimum requirements
0015 
0016 cmake_minimum_required (VERSION 3.16 FATAL_ERROR)
0017 project(Filelight VERSION ${FILELIGHT_VERSION})
0018 
0019 set(PROJECT_VERSION ${RELEASE_SERVICE_VERSION})
0020 set(KF_MIN_VERSION "5.240.0")
0021 set(QT_REQUIRED_VERSION "6.5.0")
0022 
0023 find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
0024 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0025 
0026 set(CMAKE_CXX_STANDARD 20)
0027 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0028 
0029 include(ECMAddAppIcon)
0030 include(ECMGenerateHeaders)
0031 include(ECMInstallIcons)
0032 include(ECMMarkNonGuiExecutable)
0033 include(ECMOptionalAddSubdirectory)
0034 include(ECMSetupVersion)
0035 include(FeatureSummary)
0036 include(KDEInstallDirs)
0037 include(KDECMakeSettings)
0038 include(KDECompilerSettings NO_POLICY_SCOPE)
0039 include(ECMQtDeclareLoggingCategory)
0040 include(ECMDeprecationSettings)
0041 include(KDEClangFormat)
0042 include(KDEGitCommitHooks)
0043 include(ECMFindQmlModule)
0044 
0045 find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Widgets Quick QuickControls2)
0046 find_package(KF6 ${KF_MIN_VERSION} REQUIRED
0047     CoreAddons
0048     XmlGui # For app
0049     KIO # For part
0050     I18n
0051 )
0052 find_package(KF6DocTools) # Optional, not needed on Windows for example.
0053 
0054 find_package(KF6QQC2DesktopStyle ${KF_MIN_VERSION})
0055 set_package_properties(KF6QQC2DesktopStyle PROPERTIES TYPE RUNTIME)
0056 
0057 find_package(KF6KirigamiAddons REQUIRED)
0058 set_package_properties(KF6KirigamiAddons PROPERTIES
0059     TYPE REQUIRED
0060     PURPOSE "Provides additional visual components"
0061 )
0062 
0063 ecm_find_qmlmodule(org.kde.coreaddons 1.0)
0064 ecm_find_qmlmodule(org.kde.kirigami 2.19)
0065 ecm_find_qmlmodule(org.kde.quickcharts 1.0)
0066 ecm_find_qmlmodule(Qt.labs.platform 1.1)
0067 
0068 add_definitions(-DTRANSLATION_DOMAIN=\"filelight\")
0069 
0070 ecm_set_disabled_deprecation_versions(QT 5.15
0071     KF 5.240
0072 )
0073 
0074 include_directories(src)
0075 
0076 add_subdirectory(src)
0077 add_subdirectory(misc)
0078 if(BUILD_TESTING)
0079     add_subdirectory(autotests)
0080 endif()
0081 
0082 if (KF6DocTools_FOUND)
0083     add_subdirectory(doc)
0084 endif()
0085 
0086 ki18n_install(po)
0087 if (KF6DocTools_FOUND)
0088     kdoctools_install(po)
0089 endif()
0090 
0091 # add clang-format target for all our real source files
0092 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0093 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0094 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0095 
0096 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)