2020-10-31 04:28:40 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO facebookresearch/faiss
|
2023-03-22 04:32:36 +08:00
|
|
|
REF v1.7.3
|
|
|
|
SHA512 97649772049365363329a70d3baee1b1bd9787ad6b8cbc6ae33108cb7a470a3a0115cdfd2642acd6540808aa1c34a1e8f1216e882a4c1fd67a6d1bc38d4b6a5c
|
2020-10-31 04:28:40 +08:00
|
|
|
HEAD_REF master
|
2021-07-17 03:03:54 +08:00
|
|
|
PATCHES
|
|
|
|
fix-dependencies.patch
|
2020-10-31 04:28:40 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-07-17 03:03:54 +08:00
|
|
|
FEATURES
|
|
|
|
gpu FAISS_ENABLE_GPU
|
2020-10-31 04:28:40 +08:00
|
|
|
)
|
|
|
|
|
2021-07-17 03:03:54 +08:00
|
|
|
if ("${FAISS_ENABLE_GPU}")
|
|
|
|
if (NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX})
|
|
|
|
set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc.exe")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-09-01 08:04:51 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-10-31 04:28:40 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DFAISS_ENABLE_PYTHON=OFF # Requires SWIG
|
2021-09-01 08:04:51 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2020-10-31 04:28:40 +08:00
|
|
|
)
|
|
|
|
|
2021-09-01 08:04:51 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-10-31 04:28:40 +08:00
|
|
|
|
2021-09-01 08:04:51 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2020-10-31 04:28:40 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-09-01 08:04:51 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2020-10-31 04:28:40 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|