Warning, /maui/agenda/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 project(agenda VERSION 0.5.2) 0004 add_compile_definitions(APP_COPYRIGHT_NOTICE="© 2022-2024 Maui Development Team") 0005 0006 set(CMAKE_INCLUDE_CURRENT_DIR ON) 0007 0008 set(CMAKE_AUTOUIC ON) 0009 set(CMAKE_AUTOMOC ON) 0010 set(CMAKE_AUTORCC ON) 0011 0012 set(CMAKE_CXX_STANDARD 17) 0013 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0014 0015 set(QT_MIN_VERSION "5.15.2") 0016 set(KF5_MIN_VERSION "5.92.0") 0017 0018 set(PROJECT_URI "org.kde.${PROJECT_NAME}") 0019 add_definitions(-DPROJECT_URI="${PROJECT_URI}") 0020 0021 find_package(ECM ${REQUIRED_KF5_VERSION} REQUIRED NO_MODULE) 0022 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0023 0024 include(KDEInstallDirs) 0025 include(KDECMakeSettings) 0026 include(ECMInstallIcons) 0027 include(ECMAddAppIcon) 0028 include(KDECompilerSettings NO_POLICY_SCOPE) 0029 include(KDEClangFormat) 0030 include(ECMSetupVersion) 0031 include(ECMSourceVersionControl) 0032 include(FeatureSummary) 0033 0034 find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Quick Qml Widgets) 0035 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons) 0036 0037 find_package(Qt5QuickCompiler) 0038 set_package_properties(Qt5QuickCompiler PROPERTIES 0039 DESCRIPTION "Compile QML at build time" 0040 TYPE OPTIONAL) 0041 0042 find_package(MauiKit3) 0043 find_package(MauiKit3 REQUIRED COMPONENTS Calendar) 0044 0045 if(ECM_SOURCE_UNDER_VERSION_CONTROL) 0046 execute_process( 0047 COMMAND git rev-parse --abbrev-ref HEAD 0048 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 0049 OUTPUT_VARIABLE GIT_BRANCH 0050 OUTPUT_STRIP_TRAILING_WHITESPACE) 0051 0052 # Get the latest abbreviated commit hash of the working branch 0053 execute_process( 0054 COMMAND git log -1 --format=%h 0055 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 0056 OUTPUT_VARIABLE GIT_COMMIT_HASH 0057 OUTPUT_STRIP_TRAILING_WHITESPACE) 0058 0059 add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") 0060 add_definitions(-DGIT_BRANCH="${GIT_BRANCH}") 0061 0062 else() 0063 add_definitions(-DGIT_COMMIT_HASH="${PROJECT_VERSION}") 0064 add_definitions(-DGIT_BRANCH="${CMAKE_BUILD_TYPE}") 0065 endif() 0066 0067 ecm_setup_version(${PROJECT_VERSION} 0068 VARIABLE_PREFIX PROJECT 0069 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/project_version.h") 0070 0071 add_subdirectory(src) 0072 0073 ki18n_install(po) 0074 0075 install(FILES src/data/project.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} RENAME ${PROJECT_URI}.appdata.xml) 0076 0077 install(FILES src/data/project.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME ${PROJECT_URI}.desktop) 0078 0079 install(FILES src/assets/logo.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps RENAME ${PROJECT_NAME}.svg) 0080 0081 #install(FILES data/org.kde.index.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR}) 0082 0083 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0084 0085 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0086 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0087