Skip to content

Commit 6d2ace5

Browse files
authored
Merge pull request #305 from JohanMabille/wasm_fixes
only search for numpy when the numpy-include directory is not passed
2 parents 1b14707 + 96b5cd9 commit 6d2ace5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

+6-2
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,
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)