1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-01 08:52: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

@ -101,7 +101,7 @@ endif()
add_library(JellyfinQt ${JellyfinQt_SOURCES} ${JellyfinQt_HEADERS})
add_library(JellyfinQt ${JellyfinQt_SOURCES} ${JellyfinQt_HEADERS} qmldir JellyfinQt.qmltypes)
if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
if(BUILD_PRECOMPILED_HEADERS)
@ -128,4 +128,29 @@ install(TARGETS JellyfinQt
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
add_custom_target(qmltypes
COMMAND qmlplugindump -nonrelocatable nl.netsoj.chris.Jellyfin 1.0 > $$PWD/JellyfinQt.qmltypes)
add_custom_command(
TARGET JellyfinQt
POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_LIST_DIR}/qmldir
$<TARGET_FILE_DIR:JellyfinQt>/qmldir
)
add_custom_command(
TARGET JellyfinQt
POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_LIST_DIR}/JellyfinQt.qmltypes
$<TARGET_FILE_DIR:JellyfinQt>/JellyfinQt.qmltypes
)
set(QML_IMPORT_PATH $<TARGET_FILE_DIR:JellyfinQt> CACHE PATH "")
install(FILES $<TARGET_FILE_DIR:JellyfinQt>/qmldir DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(TARGETS JellyfinQt FILE JellyfinQtConfig.cmake)