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

0001 # SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
0002 # SPDX-FileCopyrightText: 2020 Nicolas Fella <nicolas.fella@gmx.de>
0003 # SPDX-License-Identifier: BSD-2-Clause
0004 
0005 cmake_minimum_required(VERSION 3.16)
0006 
0007 project(Kasts)
0008 set(PROJECT_VERSION "22.06")
0009 
0010 # be c++17 compliant
0011 set(CMAKE_CXX_STANDARD 17)
0012 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0013 set(CMAKE_CXX_EXTENSIONS OFF)
0014 
0015 set(KF5_MIN_VERSION "5.89.0")
0016 set(QT_MIN_VERSION "5.15.0")
0017 
0018 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0019 
0020 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0021 
0022 include(FeatureSummary)
0023 include(ECMSetupVersion)
0024 include(ECMQtDeclareLoggingCategory)
0025 include(ECMGenerateExportHeader)
0026 include(KDEInstallDirs)
0027 include(KDEGitCommitHooks)
0028 include(KDECMakeSettings)
0029 include(KDECompilerSettings NO_POLICY_SCOPE)
0030 include(ECMAddAppIcon)
0031 if(NOT ANDROID)
0032     include(KDEClangFormat)
0033 endif()
0034 
0035 ecm_setup_version(${PROJECT_VERSION}
0036     VARIABLE_PREFIX KASTS
0037     VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/kasts-version.h
0038 )
0039 
0040 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Sql Multimedia)
0041 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Syndication Config I18n ThreadWeaver)
0042 find_package(Taglib REQUIRED)
0043 find_package(Qt${QT_MAJOR_VERSION}Keychain)
0044 set_package_properties(Qt${QT_MAJOR_VERSION}Keychain PROPERTIES
0045     TYPE REQUIRED
0046     PURPOSE "Secure storage of account secrets"
0047 )
0048 
0049 find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS NetworkManagerQt)
0050 
0051 if (ANDROID)
0052     find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Svg AndroidExtras)
0053     find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2)
0054     find_package(OpenSSL REQUIRED)
0055     find_package(SQLite3)
0056     find_package(ZLIB)
0057     find_package(Gradle)
0058 else()
0059     find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Widgets DBus)
0060 endif()
0061 
0062 add_definitions(-DQT_NO_CAST_FROM_ASCII
0063                 -DQT_NO_CAST_TO_ASCII
0064                 -DQT_NO_URL_CAST_FROM_STRING
0065                 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
0066                 -DQT_USE_QSTRINGBUILDER
0067                 -DQT_DISABLE_DEPRECATED_BEFORE=0x050d00
0068 )
0069 
0070 ki18n_install(po)
0071 
0072 install(PROGRAMS org.kde.kasts.desktop DESTINATION ${KDE_INSTALL_APPDIR})
0073 install(FILES org.kde.kasts.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0074 install(FILES kasts.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
0075 
0076 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/android/version.gradle.in ${CMAKE_BINARY_DIR}/version.gradle)
0077 
0078 add_subdirectory(src)
0079 
0080 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0081 
0082 
0083 if (NOT ANDROID)
0084     # inside if-statement to work around problems with gitlab Android CI
0085     file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
0086     kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0087     kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
0088 endif()