Skip to content

Commit

Permalink
python: look for Numpy to fill Python_NumPy_INCLUDE_DIR hint
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarpent committed Jun 16, 2024
1 parent 2bea127 commit e90bdc2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,14 @@ macro(FINDPYTHON)
set(Python${_PYTHON_VERSION_MAJOR}_EXECUTABLE ${PYTHON_EXECUTABLE})
set(Python${_PYTHON_VERSION_MAJOR}_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})

if(SEARCH_FOR_NUMPY)
find_numpy()
set(Python_NumPy_INCLUDE_DIR ${NUMPY_INCLUDE_DIRS})
endif()

find_package("Python${_PYTHON_VERSION_MAJOR}" REQUIRED
COMPONENTS ${PYTHON_COMPONENTS})

else()
# No hint was provided. We can then check for first Python 2, then Python
# 3
Expand Down

0 comments on commit e90bdc2

Please sign in to comment.