8000 only search for numpy when the numpy-include directory is not passed · xtensor-stack/xtensor-python@96b5cd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96b5cd9

Browse files
committed
only search for numpy when the numpy-include directory is not passed
1 parent 1b14707 commit 96b5cd9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ else()
6060
message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS}/pybind11")
6161
endif()
6262

63-
# Look for NumPy headers
64-
find_package(Python REQUIRED COMPONENTS NumPy)
63+
# Look for NumPy headers, except if NUMPY_INCLUDE_DIRS is passed,
6D53
64+
# which is required under some circumstances (such as wasm, where
65+
# there is no real python executable)
66+
if(NOT NUMPY_INCLUDE_DIRS)
67+
find_package(Python REQUIRED COMPONENTS NumPy)
68+
endif()
6569

6670
# Build
6771
# =====

0 commit comments

Comments
 (0)
0