Skip to content

Commit

Permalink
Improve CMakeLists.txt by using current env python executable for pyb…
Browse files Browse the repository at this point in the history
…ind11 command
  • Loading branch information
waltermwaniki committed Dec 6, 2024
1 parent d6228a2 commit 6e00780
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
project(acquire-zarr-py)

execute_process(COMMAND python3 -m pybind11 --cmakedir
RESULT_VARIABLE pybind11_NOT_FOUND
OUTPUT_VARIABLE pybind11_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
execute_process(
COMMAND "${Python3_EXECUTABLE}" -m pybind11 --cmakedir
RESULT_VARIABLE pybind11_NOT_FOUND
OUTPUT_VARIABLE pybind11_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)

if (pybind11_NOT_FOUND)
Expand Down

0 comments on commit 6e00780

Please sign in to comment.