2019-09-18 00:39:44 +08:00
|
|
|
vcpkg_from_git(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
URL https://chromium.googlesource.com/libyuv/libyuv
|
2024-08-27 16:57:13 +08:00
|
|
|
REF c21dda06dd8d19b6e50168c28c324c1f32e94407 # 6 commits after switch to 1895, reason: CMake changes
|
2023-01-21 14:17:35 +08:00
|
|
|
# Check https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads/main/include/libyuv/version.h for a version!
|
2019-09-18 00:39:44 +08:00
|
|
|
PATCHES
|
2024-08-27 16:57:13 +08:00
|
|
|
cmake.diff
|
2019-09-18 00:39:44 +08:00
|
|
|
)
|
|
|
|
|
2021-12-08 04:34:46 +08:00
|
|
|
vcpkg_cmake_configure(
|
2024-08-27 16:57:13 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-09-18 00:39:44 +08:00
|
|
|
)
|
|
|
|
|
2021-12-08 04:34:46 +08:00
|
|
|
vcpkg_cmake_install()
|
2024-08-27 16:57:13 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2019-10-30 14:05:27 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2024-07-03 02:12:16 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES yuvconvert AUTO_CLEAN)
|
2019-10-24 06:09:47 +08:00
|
|
|
|
2024-08-27 16:57:13 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libyuv/basic_types.h" "defined(LIBYUV_USING_SHARED_LIBRARY)" "1")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-09-18 00:39:44 +08:00
|
|
|
|
2024-08-27 16:57:13 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libyuv-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-01-21 14:17:35 +08:00
|
|
|
|
|
|
|
vcpkg_cmake_get_vars(cmake_vars_file)
|
|
|
|
include("${cmake_vars_file}")
|
2024-08-27 16:57:13 +08:00
|
|
|
if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" [[
|
|
|
|
|
|
|
|
Attention:
|
|
|
|
You are using MSVC to compile libyuv. This build won't compile any
|
|
|
|
of the acceleration codes, which results in a very slow library.
|
|
|
|
See workarounds: https://github.com/microsoft/vcpkg/issues/28446
|
|
|
|
]])
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|