WebClientResources.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. include(WebClientVariables)
  2. option(SKIP_WEB_CLIENT "Skip downloading the web client" OFF)
  3. if(NOT SKIP_WEB_CLIENT)
  4. set(WEB_CLIENT_CPP plex-web-client-konvergo-${WEB_CLIENT_VERSION}.cpp)
  5. set(WEB_CLIENT_URL https://nightlies.plex.tv/directdl/plex-dependencies/plex-web-client-plexmediaplayer/latest/plex-web-client-konvergo-${WEB_CLIENT_VERSION}.cpp.tbz2)
  6. message(STATUS "web-client version: ${WEB_CLIENT_VERSION}")
  7. file(
  8. DOWNLOAD ${WEB_CLIENT_URL} ${CMAKE_CURRENT_BINARY_DIR}/${WEB_CLIENT_CPP}.tbz2
  9. EXPECTED_HASH SHA1=${WEB_CLIENT_HASH}
  10. TIMEOUT 100
  11. SHOW_PROGRESS
  12. TLS_VERIFY ON
  13. )
  14. add_custom_command(
  15. OUTPUT ${WEB_CLIENT_CPP}
  16. COMMAND ${CMAKE_COMMAND} -E tar xjf ${CMAKE_CURRENT_BINARY_DIR}/${WEB_CLIENT_CPP}.tbz2
  17. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${WEB_CLIENT_CPP}.tbz2
  18. COMMENT "Unpacking: ${WEB_CLIENT_CPP}.tbz2"
  19. )
  20. add_custom_target(UnpackWebClientResource
  21. DEPENDS ${WEB_CLIENT_CPP}
  22. )
  23. else(NOT SKIP_WEB_CLIENT)
  24. message(WARNING "Skipping web-client, you will not a functioning end product")
  25. endif(NOT SKIP_WEB_CLIENT)