Warning, /multimedia/elisa/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2015 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr>
0002 #
0003 # SPDX-License-Identifier: LGPL-3.0-or-later
0004 
0005 cmake_minimum_required(VERSION 3.8)
0006 
0007 # KDE Applications version, managed by release script.
0008 set(RELEASE_SERVICE_VERSION_MAJOR "22")
0009 set(RELEASE_SERVICE_VERSION_MINOR "11")
0010 set(RELEASE_SERVICE_VERSION_MICRO "70")
0011 set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0012 
0013 project(elisa
0014     VERSION ${RELEASE_SERVICE_VERSION}
0015     LANGUAGES CXX)
0016 
0017 set(REQUIRED_KF5_VERSION "5.90.0")
0018 find_package(ECM ${REQUIRED_KF5_VERSION} REQUIRED NO_MODULE)
0019 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH})
0020 
0021 include(KDEInstallDirs)
0022 include(KDECMakeSettings)
0023 include(KDECompilerSettings NO_POLICY_SCOPE)
0024 include(ECMInstallIcons)
0025 include(FeatureSummary)
0026 include(ECMAddAppIcon)
0027 include(ECMAddTests)
0028 include(ECMQtDeclareLoggingCategory)
0029 include(ECMGenerateQmlTypes)
0030 
0031 set(REQUIRED_QT_VERSION "5.15.0")
0032 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Network Qml Quick Test Sql Multimedia Svg Gui Widgets QuickTest Concurrent QuickControls2)
0033 
0034 find_package(Qt${QT_MAJOR_VERSION}Core ${REQUIRED_QT_VERSION} CONFIG REQUIRED Private)
0035 
0036 
0037 
0038 if (NOT WIN32 AND NOT ANDROID)
0039     find_package(Qt${QT_MAJOR_VERSION}DBus ${REQUIRED_QT_VERSION} CONFIG QUIET)
0040     set_package_properties(Qt${QT_MAJOR_VERSION}DBus PROPERTIES
0041         DESCRIPTION "Qt${QT_MAJOR_VERSION} DBus is needed to provide MPris2 interface to allow remote control by the desktop workspace."
0042         TYPE OPTIONAL)
0043 endif()
0044 
0045 find_package(Qt${QT_MAJOR_VERSION}QuickWidgets ${REQUIRED_QT_VERSION} CONFIG QUIET)
0046 set_package_properties(Qt${QT_MAJOR_VERSION}QuickWidgets PROPERTIES
0047     DESCRIPTION "Qt${QT_MAJOR_VERSION} Quick Widgets is needed at runtime to provide the interface."
0048     TYPE RUNTIME)
0049 
0050 find_package(Qt${QT_MAJOR_VERSION}QuickControls2 ${REQUIRED_QT_VERSION} CONFIG QUIET)
0051 set_package_properties(Qt${QT_MAJOR_VERSION}QuickControls2 PROPERTIES
0052     DESCRIPTION "Qt${QT_MAJOR_VERSION} Quick Controls version 2 is needed at runtime to provide the interface."
0053     TYPE RUNTIME)
0054 
0055 if (ANDROID)
0056     find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG QUIET OPTIONAL_COMPONENTS AndroidExtras)
0057     set_package_properties(Qt5AndroidExtras PROPERTIES
0058         DESCRIPTION "Qt5 AndroidExtras is needed to provide the Android integration."
0059         TYPE REQUIRED)
0060 endif()
0061 
0062 find_package(KF5Kirigami2 ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0063 
0064 set_package_properties(KF5Kirigami2 PROPERTIES
0065     DESCRIPTION "KF5 Kirigami 2 is needed to provide the mobile UI components."
0066     TYPE REQUIRED)
0067 
0068 find_package(KF5I18n ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0069 set_package_properties(KF5I18n PROPERTIES
0070     DESCRIPTION "KF5 text internationalization library."
0071     TYPE REQUIRED)
0072 
0073 find_package(KF5Declarative ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0074 set_package_properties(KF5Declarative PROPERTIES
0075     DESCRIPTION "Integration of QML and KDE work spaces."
0076     TYPE RECOMMENDED)
0077 
0078 find_package(KF5CoreAddons ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0079 set_package_properties(KF5CoreAddons PROPERTIES
0080     DESCRIPTION "Qt addon library with a collection of non-GUI utilities."
0081     TYPE REQUIRED)
0082 
0083 find_package(KF5IconThemes ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0084 set_package_properties(KF5IconThemes PROPERTIES
0085     DESCRIPTION "Support for icon themes."
0086     TYPE REQUIRED)
0087 
0088 if (NOT WIN32)
0089 find_package(KF5Baloo ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0090 set_package_properties(KF5Baloo PROPERTIES
0091     DESCRIPTION "Baloo provides file searching and indexing."
0092     TYPE RECOMMENDED)
0093 endif()
0094 
0095 find_package(KF5FileMetaData ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0096 set_package_properties(KF5FileMetaData PROPERTIES
0097     DESCRIPTION "Provides a simple library for extracting metadata."
0098     TYPE RECOMMENDED)
0099 
0100 find_package(KF5DocTools ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0101 set_package_properties(KF5DocTools PROPERTIES
0102     DESCRIPTION "Create documentation from DocBook library."
0103     TYPE OPTIONAL)
0104 
0105 find_package(KF5XmlGui ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0106 set_package_properties(KF5XmlGui PROPERTIES
0107     DESCRIPTION "Framework for managing menu and toolbar actions."
0108     TYPE RECOMMENDED)
0109 
0110 find_package(KF5Config ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0111 set_package_properties(KF5Config PROPERTIES
0112     DESCRIPTION "Persistent platform-independent application settings."
0113     TYPE REQUIRED)
0114 
0115 find_package(KF5ConfigWidgets ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0116 set_package_properties(KF5ConfigWidgets PROPERTIES
0117     DESCRIPTION "Widgets for configuration dialogs."
0118     TYPE RECOMMENDED)
0119 
0120 find_package(KF5Crash ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0121 set_package_properties(KF5Crash PROPERTIES
0122     DESCRIPTION "Graceful handling of application crashes."
0123     TYPE OPTIONAL)
0124 
0125 if (NOT WIN32 AND NOT ANDROID)
0126     find_package(KF5DBusAddons ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0127     set_package_properties(KF5DBusAddons PROPERTIES
0128         DESCRIPTION "Convenience classes for D-Bus."
0129         TYPE OPTIONAL)
0130 endif()
0131 
0132 find_package(KF5Package ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0133 set_package_properties(KF5Package PROPERTIES
0134     DESCRIPTION "KF5 package management library needed to get the configuration dialogs."
0135     TYPE RECOMMENDED)
0136 
0137 if (NOT ANDROID)
0138     find_package(KF5KIO ${REQUIRED_KF5_VERSION} CONFIG QUIET)
0139     set_package_properties(KF5KIO PROPERTIES
0140         DESCRIPTION "File management libraries used for file browsing."
0141         TYPE REQUIRED)
0142 endif()
0143 
0144 find_package(UPNPQT CONFIG QUIET)
0145 set_package_properties(UPNPQT PROPERTIES
0146     DESCRIPTION "UPNP layer build with Qt 5. UPnP support is currently broken. You should probably avoid this dependency."
0147     URL "https://gitlab.com/homeautomationqt/upnp-player-qt"
0148     TYPE OPTIONAL)
0149 
0150 if (UPNPQT_FOUND)
0151     message(WARNING "UPnP support is experimental and may not work.")
0152 endif()
0153 
0154 find_package(LIBVLC QUIET)
0155 set_package_properties(LIBVLC PROPERTIES
0156     DESCRIPTION "libvlc allows to play music in Elisa (otherwise it will use QtMultimedia)"
0157     URL "https://www.videolan.org/vlc/libvlc.html"
0158     TYPE RECOMMENDED)
0159 
0160 include(FeatureSummary)
0161 include(GenerateExportHeader)
0162 include(ECMSetupVersion)
0163 include(ECMGenerateHeaders)
0164 include(ECMGenerateDBusServiceFile)
0165 include(CMakePackageConfigHelpers)
0166 
0167 configure_file(config-upnp-qt.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-upnp-qt.h)
0168 
0169 ecm_setup_version(${RELEASE_SERVICE_VERSION}
0170     VARIABLE_PREFIX ELISA
0171     VERSION_HEADER elisa-version.h)
0172 
0173 set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/bin CACHE STRING "" FORCE)
0174 
0175 add_subdirectory(src)
0176 add_subdirectory(icons)
0177 if (BUILD_TESTING)
0178     add_subdirectory(autotests)
0179 endif()
0180 add_subdirectory(doc)
0181 
0182 if (KF5DBusAddons_FOUND)
0183     ecm_generate_dbus_service_file(
0184         NAME org.kde.elisa
0185         EXECUTABLE ${KDE_INSTALL_FULL_BINDIR}/elisa
0186         DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
0187     )
0188     set(ELISA_DBUSACTIVATABLE "DBusActivatable=true")
0189 else()
0190     set(ELISA_DBUSACTIVATABLE)
0191 endif()
0192 
0193 configure_file(org.kde.elisa.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.elisa.desktop @ONLY)
0194 install(
0195     PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.elisa.desktop
0196     DESTINATION ${KDE_INSTALL_APPDIR}
0197 )
0198 
0199 install(
0200     FILES org.kde.elisa.appdata.xml
0201     DESTINATION ${KDE_INSTALL_METAINFODIR}
0202 )
0203 
0204 ki18n_install(po)
0205 if (KF5DocTools_FOUND)
0206     kdoctools_install(po)
0207 endif()
0208 
0209 install(FILES elisa.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
0210 
0211 if (ANDROID)
0212     file(COPY androidResources/icon.png androidResources/splash.xml androidResources/vendor_logo.png androidResources/splash_logo.png
0213         DESTINATION ${CMAKE_SOURCE_DIR}/data/res/drawable)
0214 
0215     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/version.gradle.in ${CMAKE_BINARY_DIR}/version.gradle)
0216 endif()
0217 
0218 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0219