mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-08 22:11:48 +08:00
c9e786d81a
* Bulk remove vcpkg_fail_port_install calls. Interesting ones have been split out into separate reviews, where "interesting" means "anything more than just deleting the call to vcpkg_fail_port_install", In support of https://github.com/microsoft/vcpkg/pull/21502 * Update version database. * Revert google benchmark changes already submitted as https://github.com/microsoft/vcpkg/pull/22728 * Repair version database.
30 lines
1.1 KiB
CMake
30 lines
1.1 KiB
CMake
# The project's CMakeLists.txt uses Python to select source files. Check if it is available in advance.
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO pytorch/fbgemm
|
|
REF 51bc2ecc7086980fd9e6190163b04486cd37ac2a
|
|
SHA512 43e59ff25ec9365061be6a8db7ec592f096e74897e338dd3e17401f2188986cf3b7e26f82f7c1e2adf34496fb32cb4b50d40731bee3bf9fa5b1f2ac92a09e671
|
|
PATCHES
|
|
fix-cmakelists.patch
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DUSE_SANITIZER=OFF
|
|
-DFBGEMM_BUILD_TESTS=OFF
|
|
-DFBGEMM_BUILD_BENCHMARKS=OFF
|
|
-DPYTHON_EXECUTABLE=${PYTHON3} # inject the path instead of find_package(Python)
|
|
)
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME fbgemmLibrary CONFIG_PATH share/cmake/${PORT})
|
|
|
|
# this internal header is required by pytorch
|
|
file(INSTALL "${SOURCE_PATH}/src/RefImplementations.h"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include/fbgemm/src")
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|