portfile.cmake 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. vcpkg_from_github(
  2. OUT_SOURCE_PATH SOURCE_PATH
  3. REPO xiph/theora
  4. REF fa5707d68c2a4338d58aa8b6afc95539ba89fecb
  5. SHA512 e33da23a17e93709dfe4421b512cedbd9aab0d706f5650e0436f9c8e1cde76b902c3338d46750bb86d83e1bceb111ee84e90df36fb59b5c2e7f7aee1610752b2
  6. HEAD_REF master
  7. PATCHES
  8. 0001-fix-uwp.patch
  9. )
  10. file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
  11. file(COPY "${CMAKE_CURRENT_LIST_DIR}/libtheora.def" DESTINATION "${SOURCE_PATH}")
  12. file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-config.cmake.in" DESTINATION "${SOURCE_PATH}")
  13. if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
  14. set(THEORA_X86_OPT ON)
  15. else()
  16. set(THEORA_X86_OPT OFF)
  17. endif()
  18. vcpkg_cmake_configure(
  19. SOURCE_PATH "${SOURCE_PATH}"
  20. OPTIONS
  21. -DUSE_X86=${THEORA_X86_OPT}
  22. )
  23. vcpkg_cmake_install()
  24. vcpkg_cmake_config_fixup(CONFIG_PATH "lib/unofficial-theora")
  25. vcpkg_copy_pdbs()
  26. file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
  27. vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE")