DependencyConfiguration.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. find_package(PkgConfig)
  2. option(DISABLE_BUNDLED_DEPS "Disable the bundled deps on certain platforms" OFF)
  3. include(FetchDependencies)
  4. if(APPLE AND NOT DISABLE_BUNDLED_DEPS)
  5. download_deps("plexmediaplayer-dependencies" dir)
  6. message("dependencies are: ${dir}")
  7. set(DEFAULT_ROOT ${dir})
  8. endif(APPLE AND NOT DISABLE_BUNDLED_DEPS)
  9. if(WIN32)
  10. download_deps("plexmediaplayer-windows-dependencies" dir)
  11. message("dependencies are: ${dir}")
  12. set(DEFAULT_ROOT "${dir}")
  13. endif(WIN32)
  14. set(DEPENDENCY_ROOT ${DEFAULT_ROOT} CACHE PATH "Path where the deps are located")
  15. if(IS_DIRECTORY ${DEPENDENCY_ROOT})
  16. message(STATUS "Going to use bundled deps in directory: ${DEPENDENCY_ROOT}")
  17. list(APPEND CMAKE_FIND_ROOT_PATH ${DEPENDENCY_ROOT})
  18. list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCY_ROOT})
  19. set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig)
  20. set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
  21. include_directories(${DEPENDENCY_ROOT}/include)
  22. else(IS_DIRECTORY ${DEPENDENCY_ROOT})
  23. message(STATUS "Not using bundled deps")
  24. endif(IS_DIRECTORY ${DEPENDENCY_ROOT})
  25. find_package(Threads)
  26. # on windows we need to download the updater binary seperately
  27. if(WIN32)
  28. file(DOWNLOAD https://nightlies.plex.tv/directdl/plex-dependencies/konvergo-qt/updater.exe ${CMAKE_BINARY_DIR}/updater.exe
  29. SHOW_PROGRESS
  30. EXPECTED_HASH SHA1=d3b4f70d6542fa42c8edd2b9b93fd0916bf20f07
  31. TLS_VERIFY OFF)
  32. endif(WIN32)