DependencyConfiguration.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. set(DEPENDENCY_ROOT ${DEFAULT_ROOT} CACHE PATH "Path where the deps are located")
  27. if(IS_DIRECTORY ${DEPENDENCY_ROOT})
  28. message(STATUS "Going to use bundled deps in directory: ${DEPENDENCY_ROOT}")
  29. list(APPEND CMAKE_FIND_ROOT_PATH ${DEPENDENCY_ROOT})
  30. list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCY_ROOT})
  31. set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig)
  32. set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
  33. include_directories(${DEPENDENCY_ROOT}/include)
  34. else(IS_DIRECTORY ${DEPENDENCY_ROOT})
  35. message(STATUS "Not using bundled deps")
  36. endif(IS_DIRECTORY ${DEPENDENCY_ROOT})
  37. find_package(Threads REQUIRED)
  38. find_package(PythonInterp REQUIRED)