DependencyConfiguration.cmake 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. find_package(PkgConfig)
  2. include(FetchDependencies)
  3. if(DEPENDENCY_TOKEN)
  4. set(DEPENDCY_FOLDER "")
  5. if(OPENELEC)
  6. set(DEPENDCY_FOLDER plexmediaplayer-openelec-codecs)
  7. set(DEPS_BUILD_NUMBER 90)
  8. elseif(APPLE OR WIN32)
  9. set(DEPENDCY_FOLDER plexmediaplayer-dependencies-codecs)
  10. set(DEPS_BUILD_NUMBER 260)
  11. endif()
  12. if(NOT (DEPENDCY_FOLDER STREQUAL ""))
  13. download_deps(
  14. "${DEPENDCY_FOLDER}"
  15. ARTIFACTNAME konvergo-codecs-depends
  16. BUILD_NUMBER ${DEPS_BUILD_NUMBER}
  17. DIRECTORY dir
  18. DEPHASH_VAR DEPS_HASH
  19. DYLIB_SCRIPT_PATH ${PROJECT_SOURCE_DIR}/scripts/fix-install-names.py
  20. TOKEN ${DEPENDENCY_TOKEN}
  21. )
  22. message("dependencies are: ${dir}")
  23. set(DEFAULT_ROOT ${dir})
  24. endif()
  25. endif(DEPENDENCY_TOKEN)
  26. if(WIN32)
  27. message("dependencies are: ${dir}")
  28. set(DEFAULT_ROOT "${dir}")
  29. download_deps(
  30. "windows-redist"
  31. DIRECTORY VCREDIST_DIR
  32. ARTIFACTNAME windows-redist-2015
  33. ARCHSTR windows-x86_x64
  34. )
  35. option(ENABLE_ANGLE_DEP "Enable downloading and deployment of separate ANGLE deps" OFF)
  36. if(ENABLE_ANGLE_DEP)
  37. message(STATUS "Downloading separate ANGLE deps...")
  38. foreach(angle_file libEGL.dll libGLESv2.dll d3dcompiler_47.dll)
  39. download_dep_file(
  40. "plexmediaplayer-angle"
  41. BUILD_NUMBER 53
  42. DIRECTORY angle
  43. ARTIFACTNAME "plexmediaplayer-angle"
  44. FILENAME ${angle_file}
  45. )
  46. endforeach()
  47. endif()
  48. endif(WIN32)
  49. set(DEPENDENCY_ROOT ${DEFAULT_ROOT} CACHE PATH "Path where the deps are located")
  50. if(IS_DIRECTORY ${DEPENDENCY_ROOT})
  51. message(STATUS "Going to use bundled deps in directory: ${DEPENDENCY_ROOT}")
  52. list(APPEND CMAKE_FIND_ROOT_PATH ${DEPENDENCY_ROOT})
  53. list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCY_ROOT})
  54. set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig)
  55. set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
  56. include_directories(${DEPENDENCY_ROOT}/include)
  57. else(IS_DIRECTORY ${DEPENDENCY_ROOT})
  58. message(STATUS "Not using bundled deps")
  59. endif(IS_DIRECTORY ${DEPENDENCY_ROOT})
  60. find_package(Threads REQUIRED)
  61. find_package(PythonInterp REQUIRED)