Warning, /network/neochat/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.1) 0002 0003 project(Neochat) 0004 0005 set(KF5_MIN_VERSION "5.76.0") 0006 set(QT_MIN_VERSION "5.15.0") 0007 0008 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) 0009 0010 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) 0011 0012 set(CMAKE_CXX_STANDARD 17) 0013 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0014 0015 include(FeatureSummary) 0016 include(ECMSetupVersion) 0017 include(KDEInstallDirs) 0018 include(ECMQMLModules) 0019 include(KDEClangFormat) 0020 include(KDECMakeSettings) 0021 include(KDECompilerSettings NO_POLICY_SCOPE) 0022 0023 include(cmake/Flatpak.cmake) 0024 0025 # Fix a crash due to problems with quotient's event system. Can probably be removed once the reworked event system is in 0026 cmake_policy(SET CMP0063 OLD) 0027 0028 ecm_setup_version(1.0.1 0029 VARIABLE_PREFIX NEOCHAT 0030 VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/neochat-version.h 0031 ) 0032 0033 find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE COMPONENTS Widgets Core Quick Gui QuickControls2 Multimedia Svg) 0034 set_package_properties(Qt5 PROPERTIES 0035 TYPE REQUIRED 0036 PURPOSE "Basic application components" 0037 ) 0038 find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Kirigami2 I18n Notifications Config CoreAddons) 0039 set_package_properties(KF5 PROPERTIES 0040 TYPE REQUIRED 0041 PURPOSE "Basic application components" 0042 ) 0043 set_package_properties(KF5Kirigami2 PROPERTIES 0044 TYPE REQUIRED 0045 PURPOSE "Kirigami application UI framework" 0046 ) 0047 0048 if(ANDROID) 0049 find_package(OpenSSL) 0050 set_package_properties(OpenSSL PROPERTIES 0051 TYPE REQUIRED 0052 PURPOSE "Encrypted communications" 0053 ) 0054 else() 0055 find_package(Qt5Keychain) 0056 set_package_properties(Qt5Keychain PROPERTIES 0057 TYPE REQUIRED 0058 PURPOSE "Secure storage of account secrets" 0059 ) 0060 find_package(KF5DBusAddons ${KF5_MIN_VERSION}) 0061 set_package_properties(KF5DBusAddons PROPERTIES 0062 TYPE REQUIRED 0063 PURPOSE "DBus convenience functions" 0064 ) 0065 endif() 0066 0067 find_package(Quotient 0.6) 0068 set_package_properties(Quotient PROPERTIES 0069 TYPE REQUIRED 0070 DESCRIPTION "Qt wrapper arround Matrix API" 0071 URL "https://github.com/quotient-im/libQuotient/" 0072 PURPOSE "Talk with matrix server" 0073 ) 0074 0075 find_package(cmark) 0076 set_package_properties(cmark PROPERTIES 0077 TYPE REQUIRED 0078 DESCRIPTION "Cmark is the common mark reference implementation" 0079 URL "https://github.com/commonmark/cmark" 0080 PURPOSE "Convert markdown to html" 0081 ) 0082 0083 ecm_find_qmlmodule(org.kde.kquickimageeditor 1.0) 0084 ecm_find_qmlmodule(org.kde.kitemmodels 1.0) 0085 0086 find_package(KQuickImageEditor COMPONENTS) 0087 set_package_properties(KQuickImageEditor PROPERTIES 0088 TYPE REQUIRED 0089 DESCRIPTION "Simple image editor for QtQuick applications" 0090 URL "https://invent.kde.org/libraries/kquickimageeditor/" 0091 PURPOSE "Add image editing capability to image attachments" 0092 ) 0093 0094 install(FILES org.kde.neochat.desktop DESTINATION ${KDE_INSTALL_APPDIR}) 0095 install(FILES org.kde.neochat.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) 0096 install(FILES org.kde.neochat.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps) 0097 install(FILES neochat.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR}) 0098 0099 # add_definitions(-DQT_NO_KEYWORDS) Need to fix libQuotient first 0100 add_definitions(-DQT_NO_FOREACH) 0101 0102 add_subdirectory(src) 0103 0104 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) 0105 0106 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h) 0107 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})