Warning, /plasma/plasma-pass/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2021 Daniel Vrátil <dvratil@kde.org> 0002 # 0003 # SPDX-License-Identifier: LGPL-2.1-or-later 0004 0005 cmake_minimum_required(VERSION 3.16) 0006 0007 set(PROJECT_VERSION "1.2.1") 0008 0009 project(plasma-plasmapass VERSION ${PROJECT_VERSION}) 0010 0011 set(PROJECT_VERSION_MAJOR 1) 0012 0013 set(QT_MIN_VERSION "5.15") 0014 set(KF5_MIN_VERSION "5.90.0") 0015 0016 set(CMAKE_CXX_STANDARD 20) 0017 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0018 0019 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) 0020 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${ECM_MODULE_PATH}) 0021 0022 include(KDEInstallDirs) 0023 include(KDECMakeSettings) 0024 include(KDECompilerSettings NO_POLICY_SCOPE) 0025 include(ECMQtDeclareLoggingCategory) 0026 include(KDEClangFormat) 0027 include(KDEGitCommitHooks) 0028 include(FeatureSummary) 0029 0030 find_package(OATH) 0031 set_package_properties(OATH 0032 PROPERTIES 0033 TYPE REQUIRED 0034 DESCRIPTION "Provides components to build one-time password authentication systems" 0035 PURPOSE "Generates OTP from secret stored in password files") 0036 0037 if (QT_MAJOR_VERSION STREQUAL "6") 0038 find_package(QGpgmeQt6 ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED) 0039 else() 0040 find_package(QGpgme ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED) 0041 endif() 0042 if (QT_MAJOR_VERSION STREQUAL "6") 0043 set(QT_REQUIRED_VERSION "6.4.0") 0044 set(KF_MIN_VERSION "5.240.0") 0045 set(KF_MAJOR_VERSION "6") 0046 else() 0047 set(KF_MAJOR_VERSION "5") 0048 endif() 0049 find_package(KF${KF_MAJOR_VERSION} ${KF5_MIN_VERSION} REQUIRED COMPONENTS 0050 I18n 0051 ItemModels 0052 KIO 0053 ) 0054 0055 if (QT_MAJOR_VERSION STREQUAL "6") 0056 find_package(Plasma REQUIRED) 0057 find_package(Plasma5Support REQUIRED) 0058 else() 0059 find_package(KF5Plasma REQUIRED) 0060 endif() 0061 0062 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS 0063 Core 0064 DBus 0065 Gui 0066 Qml 0067 Concurrent 0068 ) 0069 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) 0070 add_definitions(-DQT_NO_FOREACH) 0071 0072 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic") 0073 set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic") 0074 0075 # plasmoid 0076 plasma_install_package(package org.kde.plasma.pass) 0077 0078 # qml extension plugin 0079 add_subdirectory(plugin) 0080 0081 if (BUILD_TESTING) 0082 add_subdirectory(tests) 0083 endif() 0084 install(FILES plasma-pass.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) 0085 0086 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 0087 0088 ki18n_install(po) 0089 0090 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0091