aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/fbgemm/portfile.cmake
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/fbgemm/portfile.cmake
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/fbgemm/portfile.cmake')
-rw-r--r--vcpkg/ports/fbgemm/portfile.cmake29
1 files changed, 29 insertions, 0 deletions
diff --git a/vcpkg/ports/fbgemm/portfile.cmake b/vcpkg/ports/fbgemm/portfile.cmake
new file mode 100644
index 0000000..3600251
--- /dev/null
+++ b/vcpkg/ports/fbgemm/portfile.cmake
@@ -0,0 +1,29 @@
+# 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 73a64e75ff31be7ece6f68929ee5682b0bf9eb10
+ SHA512 2757d986a977d14bd32d482452627b55aae216f77a262b2b1b88a643a2977c6c27c5a99ee91b7a7bdbb66248239ecc1a57d1953251049d787317b6355369af26
+ 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)
+
+# 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")