Warning, /maui/brun/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 project(brun VERSION 0.0.5) 0004 0005 set(CMAKE_INCLUDE_CURRENT_DIR ON) 0006 0007 set(CMAKE_AUTOUIC ON) 0008 set(CMAKE_AUTOMOC ON) 0009 set(CMAKE_AUTORCC ON) 0010 0011 set(CMAKE_CXX_STANDARD 17) 0012 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0013 0014 set(REQUIRED_KF5_VERSION 5.77.0) 0015 0016 set(PROJECT_URI "org.kde.${PROJECT_NAME}") 0017 add_definitions(-DPROJECT_URI="${PROJECT_URI}") 0018 0019 find_package(ECM ${REQUIRED_KF5_VERSION} REQUIRED NO_MODULE) 0020 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0021 set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" ${CMAKE_SOURCE_DIR}/cmake/modules) 0022 0023 include(KDEInstallDirs) 0024 include(KDECMakeSettings) 0025 include(ECMInstallIcons) 0026 include(ECMAddAppIcon) 0027 include(KDECompilerSettings NO_POLICY_SCOPE) 0028 include(KDEClangFormat) 0029 include(ECMSetupVersion) 0030 include(ECMSourceVersionControl) 0031 include(FeatureSummary) 0032 include(ECMQMLModules) 0033 0034 find_package(BISON REQUIRED) 0035 find_package(FLEX REQUIRED) 0036 0037 find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick Widgets REQUIRED) 0038 0039 find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick Widgets REQUIRED) 0040 0041 find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS I18n CoreAddons UnitConversion Config) 0042 0043 find_package(Qt5QuickCompiler) 0044 set_package_properties(Qt5QuickCompiler PROPERTIES 0045 DESCRIPTION "Compile QML at build time" 0046 TYPE OPTIONAL 0047 ) 0048 0049 find_package(MauiKit) 0050 0051 find_package(GMP) 0052 set_package_properties(GMP PROPERTIES 0053 DESCRIPTION "The GNU Multiple Precision Arithmetic Library" 0054 URL "https://gmplib.org/" 0055 TYPE REQUIRED 0056 PURPOSE "Required for building KCalc." 0057 ) 0058 0059 find_package(MPFR) 0060 set_package_properties(MPFR PROPERTIES 0061 DESCRIPTION "The GNU Multiple Precision Floating-Point Reliable Library" 0062 URL "https://www.mpfr.org/" 0063 TYPE REQUIRED 0064 PURPOSE "Required for building KCalc." 0065 ) 0066 0067 include(CheckTypeSize) 0068 include(CheckIncludeFiles) 0069 0070 check_include_files(ieeefp.h HAVE_IEEEFP_H) 0071 check_type_size("signed long" SIZEOF_SIGNED_LONG) 0072 check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG) 0073 0074 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) 0075 0076 if(ECM_SOURCE_UNDER_VERSION_CONTROL) 0077 execute_process( 0078 COMMAND git rev-parse --abbrev-ref HEAD 0079 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 0080 OUTPUT_VARIABLE GIT_BRANCH 0081 OUTPUT_STRIP_TRAILING_WHITESPACE 0082 ) 0083 0084 # Get the latest abbreviated commit hash of the working branch 0085 execute_process( 0086 COMMAND git log -1 --format=%h 0087 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 0088 OUTPUT_VARIABLE GIT_COMMIT_HASH 0089 OUTPUT_STRIP_TRAILING_WHITESPACE 0090 ) 0091 0092 add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") 0093 add_definitions(-DGIT_BRANCH="${GIT_BRANCH}") 0094 0095 else() 0096 add_definitions(-DGIT_COMMIT_HASH="${PROJECT_VERSION}") 0097 add_definitions(-DGIT_BRANCH="${CMAKE_BUILD_TYPE}") 0098 endif() 0099 0100 ecm_setup_version(${PROJECT_VERSION} 0101 VARIABLE_PREFIX PROJECT 0102 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/project_version.h" 0103 ) 0104 0105 add_subdirectory(src) 0106 0107 configure_file(config-kcalc.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kcalc.h ) 0108 add_subdirectory(knumber) 0109 0110 install(FILES data/project.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} RENAME ${PROJECT_URI}.appdata.xml) 0111 0112 install(FILES data/project.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME ${PROJECT_URI}.desktop) 0113 0114 install(FILES src/assets/logo.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps RENAME ${PROJECT_NAME}.svg) 0115 0116 #install(FILES data/org.kde.index.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR}) 0117 0118 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0119 0120 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) 0121 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 0122