mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 03:30:38 +08:00
0e4460554f
* [fbgemm] fix find_package * install internal header for pytorch * [fbgemm] remove GPU feature * The source requires ATen and some other libraries ...
32 lines
1.2 KiB
CMake
32 lines
1.2 KiB
CMake
vcpkg_fail_port_install(ON_ARCH "x86" ON_TARGET "uwp")
|
|
|
|
# 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")
|