2021-07-16 20:03:54 +01:00
|
|
|
diff --git a/cmake/faiss-config.cmake.in b/cmake/faiss-config.cmake.in
|
2021-09-01 08:04:51 +08:00
|
|
|
index 43ea9d4..437a7f8 100644
|
2021-07-16 20:03:54 +01:00
|
|
|
--- a/cmake/faiss-config.cmake.in
|
|
|
|
+++ b/cmake/faiss-config.cmake.in
|
|
|
|
@@ -4,4 +4,7 @@
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
+find_dependency(OpenMP REQUIRED)
|
|
|
|
+find_dependency(BLAS REQUIRED)
|
|
|
|
+find_dependency(LAPACK REQUIRED)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/faiss-targets.cmake")
|
|
|
|
diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt
|
2021-09-01 08:04:51 +08:00
|
|
|
index 30d573f..9af8baf 100644
|
2021-07-16 20:03:54 +01:00
|
|
|
--- a/faiss/CMakeLists.txt
|
|
|
|
+++ b/faiss/CMakeLists.txt
|
2021-09-01 08:04:51 +08:00
|
|
|
@@ -212,17 +212,17 @@ target_link_libraries(faiss PRIVATE OpenMP::OpenMP_CXX)
|
|
|
|
target_link_libraries(faiss_avx2 PRIVATE OpenMP::OpenMP_CXX)
|
2021-07-16 20:03:54 +01:00
|
|
|
|
|
|
|
find_package(MKL)
|
|
|
|
-if(MKL_FOUND)
|
|
|
|
+if(0)
|
|
|
|
target_link_libraries(faiss PRIVATE ${MKL_LIBRARIES})
|
2021-09-01 08:04:51 +08:00
|
|
|
target_link_libraries(faiss_avx2 PRIVATE ${MKL_LIBRARIES})
|
2021-07-16 20:03:54 +01:00
|
|
|
else()
|
|
|
|
find_package(BLAS REQUIRED)
|
|
|
|
- target_link_libraries(faiss PRIVATE ${BLAS_LIBRARIES})
|
2021-09-01 08:04:51 +08:00
|
|
|
- target_link_libraries(faiss_avx2 PRIVATE ${BLAS_LIBRARIES})
|
2021-07-16 20:03:54 +01:00
|
|
|
+ target_link_libraries(faiss PRIVATE BLAS::BLAS)
|
2021-09-01 08:04:51 +08:00
|
|
|
+ target_link_libraries(faiss_avx2 PRIVATE BLAS::BLAS)
|
2021-07-16 20:03:54 +01:00
|
|
|
|
|
|
|
find_package(LAPACK REQUIRED)
|
|
|
|
- target_link_libraries(faiss PRIVATE ${LAPACK_LIBRARIES})
|
2021-09-01 08:04:51 +08:00
|
|
|
- target_link_libraries(faiss_avx2 PRIVATE ${LAPACK_LIBRARIES})
|
2021-07-16 20:03:54 +01:00
|
|
|
+ target_link_libraries(faiss PRIVATE LAPACK::LAPACK)
|
2021-09-01 08:04:51 +08:00
|
|
|
+ target_link_libraries(faiss_avx2 PRIVATE LAPACK::LAPACK)
|
2021-07-16 20:03:54 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
install(TARGETS faiss
|