Skip to content

Commit

Permalink
install CMake metadata in standard location (#78)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Aug 9, 2024
2 parents 2a2ebfc + b1d59cf commit a329d1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions recipe/build-lib.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cmake -G Ninja ^
-DFAISS_ENABLE_PYTHON=OFF ^
-DFAISS_ENABLE_GPU=!FAISS_ENABLE_GPU! ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_DATAROOTDIR="%LIBRARY_PREFIX:\=/%/lib/cmake" ^
!CUDA_CONFIG_ARGS! ^
..
if %ERRORLEVEL% neq 0 exit 1
Expand Down
1 change: 1 addition & 0 deletions recipe/build-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cmake -G Ninja \
-DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_DATAROOTDIR="${PREFIX}/lib/cmake" \
${CUDA_CONFIG_ARGS+"${CUDA_CONFIG_ARGS[@]}"} \
..

Expand Down
6 changes: 5 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ source:
- patches/0011-don-t-rely-on-luck-for-initialization-order-on-win-C.patch # [win and cuda_compiler_version != "None"]

build:
number: 0
number: 1

requirements:
build:
Expand Down Expand Up @@ -145,6 +145,10 @@ outputs:
- if not exist %LIBRARY_INC%\faiss\{{ "\\".join(each_header.split("/")) }} exit 1 # [win]
{% endfor %}

# CMake metadata
- test -f $PREFIX/lib/cmake/faiss/faiss-targets.cmake # [unix]
- if not exist %LIBRARY_LIB%\cmake\faiss\faiss-targets.cmake exit 1 # [win]

- name: faiss
script: build-pkg.sh # [not win]
script: build-pkg.bat # [win]
Expand Down

0 comments on commit a329d1e

Please sign in to comment.