147 lines
3.7 KiB
CMake
147 lines
3.7 KiB
CMake
# Code without UI (subtitles, mpv.conf handling, where translations are saved), kept
|
|
# apart from the app so autotests can link it.
|
|
add_library(qtpotato_core STATIC
|
|
media/mediainfo.cpp
|
|
media/mediainfo.h
|
|
mpv/mpvuserconfig.cpp
|
|
mpv/mpvuserconfig.h
|
|
mpv/trackselection.cpp
|
|
mpv/trackselection.h
|
|
subtitles/subtitleparser.cpp
|
|
subtitles/subtitleparser.h
|
|
subtitles/subtitleextractor.cpp
|
|
subtitles/subtitleextractor.h
|
|
translate/translationstore.cpp
|
|
translate/translationstore.h
|
|
)
|
|
target_include_directories(qtpotato_core PUBLIC media mpv subtitles translate)
|
|
target_link_libraries(qtpotato_core PUBLIC
|
|
Qt6::Core
|
|
KF6::I18n
|
|
PRIVATE
|
|
PkgConfig::FFMPEG
|
|
)
|
|
|
|
add_executable(qtpotato
|
|
main.cpp
|
|
models/recentfilesmodel.cpp
|
|
models/recentfilesmodel.h
|
|
mpris/mpriscontroller.cpp
|
|
mpris/mpriscontroller.h
|
|
mpris/mprisitem.cpp
|
|
mpris/mprisitem.h
|
|
mpris/playeradaptor.cpp
|
|
mpris/playeradaptor.h
|
|
mpris/rootadaptor.cpp
|
|
mpris/rootadaptor.h
|
|
mpv/mpvitem.cpp
|
|
mpv/mpvitem.h
|
|
playlist/playlistmodel.cpp
|
|
playlist/playlistmodel.h
|
|
translate/apikeystore.cpp
|
|
translate/apikeystore.h
|
|
translate/glossarystore.cpp
|
|
translate/glossarystore.h
|
|
translate/llmclient.cpp
|
|
translate/llmclient.h
|
|
translate/translationservice.cpp
|
|
translate/translationservice.h
|
|
translate/translationpresets.cpp
|
|
translate/translationpresets.h
|
|
)
|
|
|
|
kconfig_target_kcfg_file(qtpotato
|
|
FILE ${CMAKE_CURRENT_SOURCE_DIR}/settings/qtpotatosettings.kcfg
|
|
CLASS_NAME QtPotatoSettings
|
|
MUTATORS
|
|
NOTIFIERS
|
|
DEFAULT_VALUE_GETTERS
|
|
GENERATE_PROPERTIES
|
|
GENERATE_MOC
|
|
SINGLETON
|
|
QML_REGISTRATION
|
|
)
|
|
|
|
ecm_add_qml_module(qtpotato
|
|
URI dev.trivk.qtpotato
|
|
)
|
|
|
|
ecm_target_qml_sources(qtpotato SOURCES
|
|
qml/Actions.qml
|
|
qml/AppMenu.qml
|
|
qml/AppMenuItem.qml
|
|
qml/AudioMenu.qml
|
|
qml/AudioTracksMenu.qml
|
|
qml/FileMenu.qml
|
|
qml/Footer.qml
|
|
qml/GeneralSettings.qml
|
|
qml/GlossaryDialog.qml
|
|
qml/HamburgerMenu.qml
|
|
qml/Header.qml
|
|
qml/HelpMenu.qml
|
|
qml/InputPopup.qml
|
|
qml/LabelWithTooltip.qml
|
|
qml/Main.qml
|
|
qml/MainMenuBar.qml
|
|
qml/MpvContextMenu.qml
|
|
qml/MpvVideo.qml
|
|
qml/Osd.qml
|
|
qml/PlaybackMenu.qml
|
|
qml/PlaybackSettings.qml
|
|
qml/Playlist.qml
|
|
qml/PlaylistItem.qml
|
|
qml/PlaylistSettings.qml
|
|
qml/RecentFilesMenu.qml
|
|
qml/ResizeHandler.qml
|
|
qml/SeekBar.qml
|
|
qml/SettingsBasePage.qml
|
|
qml/SettingsHeader.qml
|
|
qml/SettingsMenu.qml
|
|
qml/SettingsWindow.qml
|
|
qml/SubtitleTracksMenu.qml
|
|
qml/SubtitlesMenu.qml
|
|
qml/SubtitlesSettings.qml
|
|
qml/ToolTipButton.qml
|
|
qml/TranslationSettings.qml
|
|
qml/VideoMenu.qml
|
|
qml/ViewMenu.qml
|
|
qml/VolumeSlider.qml
|
|
)
|
|
|
|
# Bundled copy of the app icon, used when the installed one is not in the icon theme
|
|
# (e.g. running from the build directory).
|
|
qt_add_resources(qtpotato "icons"
|
|
PREFIX "/"
|
|
BASE icons
|
|
FILES icons/dev.trivk.qtpotato.svg
|
|
)
|
|
|
|
target_include_directories(qtpotato PRIVATE models mpris mpv playlist translate)
|
|
target_compile_definitions(qtpotato PRIVATE QTPOTATO_VERSION_STRING="${PROJECT_VERSION}")
|
|
|
|
target_link_libraries(qtpotato PRIVATE
|
|
qtpotato_core
|
|
Qt6::Gui
|
|
Qt6::Qml
|
|
Qt6::Quick
|
|
Qt6::QuickControls2
|
|
Qt6::Widgets
|
|
Qt6::Network
|
|
Qt6::Concurrent
|
|
Qt6::DBus
|
|
KF6::I18n
|
|
KF6::I18nQml
|
|
KF6::CoreAddons
|
|
KF6::Crash
|
|
KF6::ConfigCore
|
|
KF6::ConfigGui
|
|
MpvQt::MpvQt
|
|
QCoro6::Core
|
|
QCoro6::Network
|
|
qt6keychain
|
|
)
|
|
|
|
install(TARGETS qtpotato ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
|
install(FILES dev.trivk.qtpotato.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
|
install(FILES icons/dev.trivk.qtpotato.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
|