Warning, /office/klevernotes/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-License-Identifier: BSD-3-Clause
0002 # SPDX-FileCopyrightText: 2022 Louis Schul <schul9louis@gmail.com>
0003 
0004 cmake_minimum_required(VERSION 3.16)
0005 
0006 project(klevernotes VERSION 0.1)
0007 
0008 include(FeatureSummary)
0009 
0010 set(QT_MIN_VERSION "6.5")
0011 set(KF_MIN_VERSION "5.240.0")
0012 
0013 find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
0014 
0015 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0016 
0017 set(CMAKE_CXX_STANDARD 17)
0018 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0019 
0020 include(KDEInstallDirs)
0021 include(KDECMakeSettings)
0022 include(KDECompilerSettings NO_POLICY_SCOPE)
0023 include(ECMSetupVersion)
0024 include(ECMGenerateHeaders)
0025 include(KDEClangFormat)
0026 include(KDEGitCommitHooks)
0027 
0028 ecm_setup_version(${PROJECT_VERSION}
0029     VARIABLE_PREFIX KLEVER
0030     VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/version-klevernotes.h"
0031 )
0032 
0033 find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS
0034     Core
0035     Gui
0036     Qml
0037     QuickControls2
0038     Svg
0039     WebEngineWidgets
0040     WebEngineQuick
0041 )
0042 
0043 find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS
0044     Kirigami2
0045     CoreAddons
0046     Config
0047     I18n
0048     ConfigWidgets
0049     KIO
0050 )
0051 
0052 if (ANDROID)
0053     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/android/version.gradle.in ${CMAKE_BINARY_DIR}/version.gradle)
0054 endif()
0055 
0056 add_subdirectory(src)
0057 
0058 ki18n_install(po)
0059 
0060 install(PROGRAMS org.kde.klevernotes.desktop DESTINATION ${KDE_INSTALL_APPDIR})
0061 install(FILES org.kde.klevernotes.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0062 install(FILES org.kde.klevernotes.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
0063 
0064 
0065 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0066 
0067 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
0068 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0069 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)