Skip to content

Commit

Permalink
Merge pull request #698 from jcarpent/topic/python
Browse files Browse the repository at this point in the history
Look for Numpy to fill Python_NumPy_INCLUDE_DIR hint
  • Loading branch information
nim65s authored Jul 24, 2024
2 parents f736a73 + e90bdc2 commit 629ca62
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 629ca62

Please sign in to comment.