DependencyConfiguration.cmake 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 72)
  8. elseif(APPLE OR WIN32)
  9. set(DEPENDCY_FOLDER plexmediaplayer-dependencies-codecs)
  10. set(DEPS_BUILD_NUMBER 213)
  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. endif(WIN32)
  36. set(DEPENDENCY_ROOT ${DEFAULT_ROOT} CACHE PATH "Path where the deps are located")
  37. if(IS_DIRECTORY ${DEPENDENCY_ROOT})
  38. message(STATUS "Going to use bundled deps in directory: ${DEPENDENCY_ROOT}")
  39. list(APPEND CMAKE_FIND_ROOT_PATH ${DEPENDENCY_ROOT})
  40. list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCY_ROOT})
  41. set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig)
  42. set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
  43. include_directories(${DEPENDENCY_ROOT}/include)
  44. else(IS_DIRECTORY ${DEPENDENCY_ROOT})
  45. message(STATUS "Not using bundled deps")
  46. endif(IS_DIRECTORY ${DEPENDENCY_ROOT})
  47. find_package(Threads REQUIRED)
  48. find_package(PythonInterp REQUIRED)