Warning, /plasma/plasma-disks/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-License-Identifier: BSD-3-Clause
0002 # SPDX-FileCopyrightText: 2020-2021 Harald Sitter <sitter@kde.org>
0003 
0004 cmake_minimum_required(VERSION 3.16)
0005 
0006 project(plasma-disks)
0007 set(PROJECT_VERSION "5.25.5")
0008 
0009 set(QT_MIN_VERSION "5.15.2")
0010 set(KF5_MIN_VERSION "5.94")
0011 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0012 
0013 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0014 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
0015 
0016 set(CMAKE_CXX_STANDARD 14)
0017 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0018 
0019 include(CMakeDependentOption)
0020 include(KDEInstallDirs)
0021 include(KDECMakeSettings)
0022 include(KDECompilerSettings NO_POLICY_SCOPE)
0023 include(ECMQtDeclareLoggingCategory)
0024 include(KDEClangFormat)
0025 include(FeatureSummary)
0026 include(KDEGitCommitHooks)
0027 
0028 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui Core)
0029 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0030     CoreAddons
0031     DBusAddons
0032     Notifications
0033     I18n
0034     Solid
0035     Service
0036     KIO
0037     Auth
0038     Declarative
0039 )
0040 
0041 find_package(smartctl)
0042 set_package_properties(smartctl PROPERTIES TYPE RUNTIME)
0043 
0044 cmake_dependent_option(WITH_SIMULATION
0045     "Build with simulation tech allowing easy testing via PLASMA_DISKS_SIMULATION=1"
0046     ON
0047     "CMAKE_BUILD_TYPE MATCHES [Dd]ebug"
0048     OFF
0049 )
0050 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
0051 add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055B00)
0052 
0053 add_subdirectory(src)
0054 
0055 if(BUILD_TESTING)
0056     add_subdirectory(autotests)
0057 endif()
0058 
0059 ki18n_install(po)
0060 
0061 install(FILES org.kde.plasma.disks.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0062 
0063 # add clang-format target for all our real source files
0064 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
0065 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0066 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0067 
0068 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)