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

0001 # SPDX-FileCopyrightText: 2021 Mathis BrĂ¼chert <mbb-mail@gmx.de>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 cmake_minimum_required(VERSION 3.16)
0005 
0006 # TODO move to release service
0007 set(RELEASE_SERVICE_VERSION "0.1.0")
0008 
0009 project(marknote VERSION ${RELEASE_SERVICE_VERSION})
0010 
0011 include(FeatureSummary)
0012 
0013 set(QT5_MIN_VERSION 5.12)
0014 set(KF5_MIN_VERSION 5.65)
0015 
0016 find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
0017 
0018 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
0019 
0020 set(CMAKE_CXX_STANDARD 17)
0021 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0022 
0023 include(KDEInstallDirs)
0024 include(KDECMakeSettings)
0025 include(ECMSetupVersion)
0026 include(KDEClangFormat)
0027 include(KDECompilerSettings NO_POLICY_SCOPE)
0028 include(ECMQtDeclareLoggingCategory)
0029 include(KDEGitCommitHooks)
0030 
0031 ecm_setup_version(${PROJECT_VERSION}
0032     VARIABLE_PREFIX MARKNOTE
0033     VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/marknote-version.h
0034 )
0035 
0036 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Gui Qml QuickControls2 Svg)
0037 find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 I18n Config CoreAddons)
0038 if (NOT ANDROID)
0039     find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Widgets)
0040 endif()
0041 
0042 add_definitions(-DQT_NO_FOREACH -DQT_NO_KEYWORDS)
0043 
0044 add_subdirectory(src)
0045 
0046 ki18n_install(po)
0047 
0048 install(PROGRAMS org.kde.marknote.desktop DESTINATION ${KDE_INSTALL_APPDIR})
0049 install(FILES org.kde.marknote.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0050 install(FILES org.kde.marknote.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
0051 
0052 ecm_qt_install_logging_categories(
0053     EXPORT MARKNOTE
0054     FILE marknote.categories
0055     SORT DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0056 )
0057 
0058 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0059 
0060 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
0061 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0062 
0063 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)