79 lines
1.7 KiB
CMake
79 lines
1.7 KiB
CMake
# Code without UI (subtitles, mpv.conf handling), kept apart from the app so autotests
|
|
# can link it.
|
|
add_library(qtpotato_core STATIC
|
|
mpv/mpvuserconfig.cpp
|
|
mpv/mpvuserconfig.h
|
|
subtitles/subtitleparser.cpp
|
|
subtitles/subtitleparser.h
|
|
subtitles/subtitleextractor.cpp
|
|
subtitles/subtitleextractor.h
|
|
)
|
|
target_include_directories(qtpotato_core PUBLIC mpv subtitles)
|
|
target_link_libraries(qtpotato_core PUBLIC
|
|
Qt6::Core
|
|
KF6::I18n
|
|
PRIVATE
|
|
PkgConfig::FFMPEG
|
|
)
|
|
|
|
add_executable(qtpotato
|
|
main.cpp
|
|
mpv/mpvitem.cpp
|
|
mpv/mpvitem.h
|
|
translate/apikeystore.cpp
|
|
translate/apikeystore.h
|
|
translate/llmclient.cpp
|
|
translate/llmclient.h
|
|
translate/translationservice.cpp
|
|
translate/translationservice.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/Main.qml
|
|
qml/PlayerPage.qml
|
|
qml/SubtitlePopup.qml
|
|
qml/SettingsPage.qml
|
|
)
|
|
|
|
target_include_directories(qtpotato PRIVATE mpv 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
|
|
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})
|