2020-10-25 23:14:46 +00:00
|
|
|
project(jellyfin-qt VERSION 0.1.0)
|
2020-10-25 18:58:02 +00:00
|
|
|
find_package(Qt5 5.6 COMPONENTS Multimedia Network Qml WebSockets REQUIRED)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2021-02-20 23:26:18 +00:00
|
|
|
include(GeneratedSources.cmake)
|
|
|
|
|
2020-10-25 18:58:02 +00:00
|
|
|
set(jellyfin-qt_SOURCES
|
2021-02-21 04:02:05 +00:00
|
|
|
# src/DTO/dto.cpp
|
2021-03-05 14:34:10 +00:00
|
|
|
src/support/loader.cpp
|
2021-02-17 18:42:10 +00:00
|
|
|
src/apiclient.cpp
|
|
|
|
src/apimodel.cpp
|
|
|
|
src/credentialmanager.cpp
|
|
|
|
src/deviceprofile.cpp
|
|
|
|
src/jellyfin.cpp
|
|
|
|
src/jsonhelper.cpp
|
|
|
|
src/playbackmanager.cpp
|
2021-02-21 04:02:05 +00:00
|
|
|
src/remotedata.cpp
|
2021-02-17 18:42:10 +00:00
|
|
|
src/serverdiscoverymodel.cpp
|
|
|
|
src/websocket.cpp)
|
2020-10-25 18:58:02 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
list(APPEND jellyfin-qt_SOURCES ${openapi_SOURCES})
|
2021-02-20 23:26:18 +00:00
|
|
|
|
2020-10-25 18:58:02 +00:00
|
|
|
set(jellyfin-qt_HEADERS
|
2021-02-21 04:02:05 +00:00
|
|
|
# include/JellyfinQt/DTO/dto.h
|
2021-03-05 14:34:10 +00:00
|
|
|
include/JellyfinQt/support/loader.h
|
2021-02-17 18:42:10 +00:00
|
|
|
include/JellyfinQt/apiclient.h
|
|
|
|
include/JellyfinQt/apimodel.h
|
|
|
|
include/JellyfinQt/credentialmanager.h
|
|
|
|
include/JellyfinQt/deviceprofile.h
|
|
|
|
include/JellyfinQt/jellyfin.h
|
|
|
|
include/JellyfinQt/jsonhelper.h
|
|
|
|
include/JellyfinQt/playbackmanager.h
|
2021-02-21 04:02:05 +00:00
|
|
|
include/JellyfinQt/remotedata.h
|
2021-02-17 18:42:10 +00:00
|
|
|
include/JellyfinQt/serverdiscoverymodel.h
|
|
|
|
include/JellyfinQt/websocket.h)
|
2021-02-20 23:26:18 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
list(APPEND jellyfin-qt_SOURCES ${openapi_HEADERS})
|
2020-10-25 18:58:02 +00:00
|
|
|
|
|
|
|
add_definitions(-DSAILFIN_VERSION=\"${SAILFIN_VERSION}\")
|
2021-02-17 01:28:37 +00:00
|
|
|
if (PLATFORM_SAILFISHOS)
|
|
|
|
add_definitions(-DPLATFORM_SAILFISHOS=1)
|
|
|
|
endif()
|
2020-10-25 18:58:02 +00:00
|
|
|
add_library(jellyfin-qt ${jellyfin-qt_SOURCES} ${jellyfin-qt_HEADERS})
|
2021-02-21 04:02:05 +00:00
|
|
|
if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
|
|
|
|
target_precompile_headers(jellyfin-qt PRIVATE ${jellyfin-qt_HEADERS})
|
|
|
|
endif()
|
2020-10-25 18:58:02 +00:00
|
|
|
target_include_directories(jellyfin-qt
|
2021-02-21 04:02:05 +00:00
|
|
|
PUBLIC "include" "generated/include"
|
2020-10-25 18:58:02 +00:00
|
|
|
)
|
|
|
|
target_link_libraries(jellyfin-qt PUBLIC Qt5::Core Qt5::Multimedia Qt5::Network Qt5::Qml Qt5::WebSockets)
|
|
|
|
set_target_properties(jellyfin-qt PROPERTIES CXX_VISIBILITY_PRESET default)
|
|
|
|
install(TARGETS jellyfin-qt
|
|
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
|
|
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
|
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
|
|
|
|
|
|
export(TARGETS jellyfin-qt FILE JellyfinQtConfig.cmake)
|