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

0001 #
0002 # SPDX-FileCopyrightText: 2020 George Florea Bănuș <georgefb899@gmail.com>
0003 #
0004 # SPDX-License-Identifier: GPL-3.0-or-later
0005 #
0006 
0007 # DATA_ICONS is defined in data/CMakeLists.txt
0008 ecm_add_app_icon(ICONS_SRCS ICONS ${DATA_ICONS})
0009 
0010 add_executable(haruna)
0011 
0012 target_sources(haruna
0013     PRIVATE
0014     application.h application.cpp
0015     framedecoder.h framedecoder.cpp
0016     global.h global.cpp
0017     KDSingleApplication/kdsingleapplication_localsocket_p.h KDSingleApplication/kdsingleapplication_localsocket.cpp
0018     KDSingleApplication/kdsingleapplication.h KDSingleApplication/kdsingleapplication.cpp
0019     main.cpp
0020     models/actionsmodel.h models/actionsmodel.cpp
0021     models/chaptersmodel.h models/chaptersmodel.cpp
0022     models/customcommandsmodel.h models/customcommandsmodel.cpp
0023     models/recentfilesmodel.h models/recentfilesmodel.cpp
0024     models/subtitlesfoldersmodel.h models/subtitlesfoldersmodel.cpp
0025     models/tracksmodel.h models/tracksmodel.cpp
0026     models/playlistmodel.h models/playlistmodel.cpp
0027     mpv/mpvitem.h mpv/mpvitem.cpp
0028     mpv/mpvpreview.h mpv/mpvpreview.cpp
0029     mpv/mpvproperties.h
0030     thumbnailimageprovider.h thumbnailimageprovider.cpp
0031     worker.h worker.cpp
0032     ../help/help.qrc
0033     ${ICONS_SRCS}
0034 )
0035 
0036 if (CMAKE_SYSTEM_NAME IN_LIST X11_PLATFORMS)
0037     qt_add_dbus_interface(haruna_screensaver_inhibit_SRCS ../org.freedesktop.ScreenSaver.xml screensaverdbusinterface)
0038     target_sources(haruna
0039         PRIVATE
0040         lockmanager.h lockmanager.cpp
0041         mpris2/mediaplayer2.h mpris2/mediaplayer2.cpp
0042         mpris2/mediaplayer2player.h mpris2/mediaplayer2player.cpp
0043         ${haruna_screensaver_inhibit_SRCS}
0044     )
0045     target_include_directories(haruna PRIVATE mpris2)
0046 endif()
0047 
0048 qt_policy(SET QTP0001 NEW)
0049 
0050 qt_add_qml_module(haruna
0051     URI org.kde.haruna
0052     VERSION 1.0
0053     QML_FILES
0054         qml/Actions.qml
0055         qml/Footer.qml
0056         qml/Header.qml
0057         qml/HProgressBar.qml
0058         qml/MenuBarLoader.qml
0059         qml/MpvVideo.qml
0060         qml/Osd.qml
0061         qml/PlayList.qml
0062         qml/PlayListItem.qml
0063         qml/PlayListItemCompact.qml
0064         qml/PlayListItemWithThumbnail.qml
0065         qml/VolumeSlider.qml
0066         qml/main.qml
0067 
0068         qml/Haruna/Components/AudioTracksMenu.qml
0069         qml/Haruna/Components/ColorPickerButton.qml
0070         qml/Haruna/Components/HamburgerMenu.qml
0071         qml/Haruna/Components/ImageAdjustmentSlider.qml
0072         qml/Haruna/Components/InputPopup.qml
0073         qml/Haruna/Components/LabelWithTooltip.qml
0074         qml/Haruna/Components/SelectActionPopup.qml
0075         qml/Haruna/Components/SettingsBasePage.qml
0076         qml/Haruna/Components/SettingsHeader.qml
0077         qml/Haruna/Components/SubtitlesFolders.qml
0078         qml/Haruna/Components/SubtitleTracksMenu.qml
0079 
0080         qml/Menus/AudioMenu.qml
0081         qml/Menus/ContextMenu.qml
0082         qml/Menus/FileMenu.qml
0083         qml/Menus/HelpMenu.qml
0084         qml/Menus/PlaybackMenu.qml
0085         qml/Menus/SettingsMenu.qml
0086         qml/Menus/SubtitlesMenu.qml
0087         qml/Menus/VideoMenu.qml
0088         qml/Menus/ViewMenu.qml
0089         qml/Menus/Global/GlobalAudioMenu.qml
0090         qml/Menus/Global/GlobalFileMenu.qml
0091         qml/Menus/Global/GlobalHelpMenu.qml
0092         qml/Menus/Global/GlobalPlaybackMenu.qml
0093         qml/Menus/Global/GlobalSettingsMenu.qml
0094         qml/Menus/Global/GlobalSubtitlesMenu.qml
0095         qml/Menus/Global/GlobalVideoMenu.qml
0096         qml/Menus/Global/GlobalViewMenu.qml
0097 
0098         qml/Settings/GeneralSettings.qml
0099         qml/Settings/PlaybackSettings.qml
0100         qml/Settings/VideoSettings.qml
0101         qml/Settings/AudioSettings.qml
0102         qml/Settings/SubtitlesSettings.qml
0103         qml/Settings/PlaylistSettings.qml
0104         qml/Settings/MouseSettings.qml
0105         qml/Settings/ShortcutsSettings.qml
0106         qml/Settings/CustomCommandsSettings.qml
0107         qml/Settings/EditCustomCommand.qml
0108         qml/Settings/DebugSettings.qml
0109         qml/Settings/SettingsWindow.qml
0110 )
0111 
0112 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/audiosettings.kcfgc)
0113 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/generalsettings.kcfgc)
0114 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/informationsettings.kcfgc)
0115 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/mousesettings.kcfgc)
0116 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/playbacksettings.kcfgc)
0117 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/playlistsettings.kcfgc)
0118 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/subtitlessettings.kcfgc)
0119 kconfig_add_kcfg_files(haruna GENERATE_MOC settings/videosettings.kcfgc)
0120 
0121 target_include_directories(haruna
0122     PRIVATE
0123         KDSingleApplication
0124         models
0125         mpv
0126         ${FFMPEG_INCLUDE_DIRS}
0127 )
0128 
0129 target_compile_definitions(haruna PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
0130 
0131 target_link_libraries(haruna PRIVATE
0132     Qt6::Core
0133     Qt6::Gui
0134     Qt6::Qml
0135     Qt6::Quick
0136     Qt6::QuickControls2
0137 
0138     KF6::ColorScheme
0139     KF6::ConfigCore
0140     KF6::ConfigGui
0141     KF6::CoreAddons
0142     KF6::FileMetaData
0143     KF6::I18n
0144     KF6::IconThemes
0145     KF6::KIOWidgets
0146     KF6::Kirigami
0147     KF6::WindowSystem
0148 
0149     MpvQt::MpvQt
0150     ${AVUTIL_LIBRARIES}
0151     ${AVFILTER_LIBRARIES}
0152     ${AVFORMAT_LIBRARIES}
0153     ${AVCODEC_LIBRARIES}
0154     ${SWSCALE_LIBRARIES}
0155 )
0156 
0157 if (CMAKE_SYSTEM_NAME IN_LIST X11_PLATFORMS)
0158     target_link_libraries(haruna PRIVATE
0159         Qt6::DBus
0160     )
0161 endif()
0162 install(TARGETS haruna DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})