2021-03-20 02:03:17 +09:00
|
|
|
# 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
|
|
|
|
)
|
|
|
|
|
2021-09-14 12:04:23 +09:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-03-20 02:03:17 +09:00
|
|
|
OPTIONS
|
|
|
|
-DUSE_SANITIZER=OFF
|
|
|
|
-DFBGEMM_BUILD_TESTS=OFF
|
|
|
|
-DFBGEMM_BUILD_BENCHMARKS=OFF
|
|
|
|
-DPYTHON_EXECUTABLE=${PYTHON3} # inject the path instead of find_package(Python)
|
|
|
|
)
|
2021-09-14 12:04:23 +09:00
|
|
|
vcpkg_cmake_install()
|
2021-03-20 02:03:17 +09:00
|
|
|
vcpkg_copy_pdbs()
|
2021-09-14 12:04:23 +09:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME fbgemmLibrary CONFIG_PATH share/cmake/${PORT})
|
2021-03-20 02:03:17 +09:00
|
|
|
|
2021-09-14 12:04:23 +09:00
|
|
|
# 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")
|