Skip to content

Commit 6ff7ca8

Browse files
committed
bugfix: Add NumPy headers to CMakeLists.txt
bugfix: Add NumPy headers to CMakeLists.txt, per commit scikit-build/scikit-build-sample-projects@5ad5096 at scikit-build/scikit-build-sample-projects#32
1 parent 52e75d9 commit 6ff7ca8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ if(NOT SKBUILD)
8585
list(APPEND CMAKE_MODULE_PATH "${SKBUILD_LOCATION}/resources/cmake")
8686
endif()
8787

88+
#NumPy headers
89+
execute_process(
90+
COMMAND "${PYTHON_EXECUTABLE}"
91+
-c "import numpy; print(numpy.get_include())"
92+
OUTPUT_VARIABLE NumPy_INCLUDE_DIRS
93+
OUTPUT_STRIP_TRAILING_WHITESPACE
94+
)
95+
8896
find_package(PythonExtensions REQUIRED)
8997
find_package(Cython REQUIRED)
9098
find_package(NumPy REQUIRED)

0 commit comments

Comments
 (0)