1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-04 09:42:45 +00:00

Make libJellyfinQt a proper qml plugin

This commit is contained in:
Chris Josten 2021-09-04 22:23:54 +02:00
parent 96ecd8e7d8
commit 64ad37707c
9 changed files with 1923 additions and 58 deletions

View file

@ -5,11 +5,11 @@ include(ExternalProject)
# FIXME: don't hardcode /home/deploy/installroot/
set(DEPLOY_ROOT /home/deploy/installroot/)
ExternalProject_Add(BlurhashQt
# PREFIX ${CMAKE_CURRENT_BINARY_DIR}/lib/blurhash-qt
GIT_REPOSITORY https://github.com/HenkKalkwater/BlurhashQt.git
GIT_TAG 61ae7f0feca6ab67da1bfdbcb222bbd12e8f7e07
# PREFIX ${CMAKE_CURRENT_BINARY_DIR}/lib/blurhash-qt
GIT_REPOSITORY https://github.com/HenkKalkwater/BlurhashQt.git
GIT_TAG 61ae7f0feca6ab67da1bfdbcb222bbd12e8f7e07
CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_EXPORT=OFF -DQML_PLUGIN_PATH=${PROJECT_BINARY_DIR}/plugins/)
CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_EXPORT=OFF -DQML_PLUGIN_PATH=${PROJECT_BINARY_DIR}/plugins/)
find_package(Qt5 COMPONENTS Gui Qml Quick)
find_package(SailfishApp 1.0 REQUIRED)
@ -26,8 +26,8 @@ set(sailfin_QML_SOURCES
qml/components/videoplayer/VideoError.qml
qml/components/videoplayer/VideoHud.qml
qml/components/IconListItem.qml
qml/components/JItem.qml
qml/components/LibraryItemDelegate.qml
qml/components/JItem.qml
qml/components/LibraryItemDelegate.qml
qml/components/MoreSection.qml
qml/components/PlainLabel.qml
qml/components/PlaybackBar.qml
@ -58,9 +58,10 @@ set(sailfin_QML_SOURCES
qml/pages/itemdetails/UnsupportedPage.qml
qml/pages/itemdetails/VideoPage.qml
qml/pages/settings/DebugPage.qml
qml/pages/settings/StreamingPage.qml
qml/pages/setup/AddServerConnectingPage.qml
qml/pages/setup/AddServerPage.qml
qml/pages/setup/LoginDialog.qml
qml/pages/setup/AddServerPage.qml
qml/pages/setup/LoginDialog.qml
qml/qmldir)
add_executable(harbour-sailfin ${harbour-sailfin_SOURCES} ${sailfin_QML_SOURCES})
@ -69,35 +70,33 @@ target_link_libraries(harbour-sailfin PRIVATE Qt5::Gui Qt5::Qml Qt5::Quick Sailf
# invoker/booster to work
JellyfinQt "-Wl,-rpath,${CMAKE_INSTALL_LIBDIR} -rdynamic -pie")
target_compile_definitions(harbour-sailfin
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
install(TARGETS harbour-sailfin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/
DESTINATION share/harbour-sailfin/)
DESTINATION share/harbour-sailfin/)
install(DIRECTORY qml
DESTINATION share/harbour-sailfin
DESTINATION share/harbour-sailfin
)
install(DIRECTORY translations
DESTINATION share/harbour-sailfin
FILES_MATCHING PATTERN "*.qm"
DESTINATION share/harbour-sailfin
FILES_MATCHING PATTERN "*.qm"
)
install(FILES harbour-sailfin.desktop
DESTINATION share/applications
DESTINATION share/applications
)
install(FILES icons/86x86/harbour-sailfin.png
DESTINATION share/icons/hicolor/86x86/apps
DESTINATION share/icons/hicolor/86x86/apps
)
install(FILES icons/108x108/harbour-sailfin.png
DESTINATION share/icons/hicolor/108x108/apps
)
DESTINATION share/icons/hicolor/108x108/apps )
install(FILES icons/128x128/harbour-sailfin.png
DESTINATION share/icons/hicolor/128x128/apps
DESTINATION share/icons/hicolor/128x128/apps
)
install(FILES icons/172x172/harbour-sailfin.png
DESTINATION share/icons/hicolor/172x172/apps
)
DESTINATION share/icons/hicolor/172x172/apps )
# Tell Qt Creator where the application executable(s) would be located on the
# device.
@ -111,6 +110,6 @@ install(FILES icons/172x172/harbour-sailfin.png
# Search the Qt Creator Manual to learn about the QtCreatorDeployment.txt file
# format.
file(WRITE "${CMAKE_BINARY_DIR}/QtCreatorDeployment.txt"
"${CMAKE_INSTALL_PREFIX}
${CMAKE_BINARY_DIR}/sailfish/harbour-sailfin:bin
"${CMAKE_INSTALL_PREFIX}
${CMAKE_BINARY_DIR}/sailfish/harbour-sailfin:bin
")