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 "22")
0010 set(RELEASE_SERVICE_VERSION_MINOR "11")
0011 set(RELEASE_SERVICE_VERSION_MICRO "70")
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(KF5_MIN_VERSION "5.94.0")
0021 set(QT_REQUIRED_VERSION "5.15.2")
0022 
0023 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0024 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0025 
0026 include(ECMAddAppIcon)
0027 include(ECMGenerateHeaders)
0028 include(ECMInstallIcons)
0029 include(ECMMarkNonGuiExecutable)
0030 include(ECMOptionalAddSubdirectory)
0031 include(ECMSetupVersion)
0032 include(FeatureSummary)
0033 include(KDEInstallDirs)
0034 include(KDECMakeSettings)
0035 include(KDECompilerSettings NO_POLICY_SCOPE)
0036 include(ECMQtDeclareLoggingCategory)
0037 include(ECMDeprecationSettings)
0038 include(KDEClangFormat)
0039 include(KDEGitCommitHooks)
0040 include(ECMFindQmlModule)
0041 
0042 find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Widgets Svg Quick QuickControls2)
0043 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
0044     XmlGui # For app
0045     KIO # For part
0046     I18n
0047     Declarative
0048 )
0049 find_package(KF5DocTools) # Optional, not needed on Windows for example.
0050 
0051 find_package(KF5QQC2DesktopStyle ${KF5_MIN_VERSION})
0052 set_package_properties(KF5QQC2DesktopStyle PROPERTIES TYPE RUNTIME)
0053 
0054 ecm_find_qmlmodule(org.kde.kirigami 2.19)
0055 ecm_find_qmlmodule(org.kde.quickcharts 1.0)
0056 
0057 add_definitions(-DTRANSLATION_DOMAIN=\"filelight\")
0058 
0059 ecm_set_disabled_deprecation_versions(QT 5.15.2
0060     KF 5.92
0061 )
0062 
0063 include_directories(src)
0064 
0065 add_subdirectory(src)
0066 add_subdirectory(misc)
0067 if(BUILD_TESTING)
0068     add_subdirectory(autotests)
0069 endif()
0070 
0071 if (KF5DocTools_FOUND)
0072     add_subdirectory(doc)
0073 endif()
0074 
0075 ki18n_install(po)
0076 if (KF5DocTools_FOUND)
0077     kdoctools_install(po)
0078 endif()
0079 
0080 # add clang-format target for all our real source files
0081 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0082 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0083 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0084 
0085 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)