Skip to content

Commit

Permalink
Also look for Python with pybind11
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsoSR committed Sep 30, 2024
1 parent 6eeb0b4 commit 05ed975
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmake/YACMAPythonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ endif()
# Find Python interpreter.
find_package(PythonInterp REQUIRED)

# Find Python through pybind11
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 CONFIG REQUIRED)

if (Python_INCLUDE_DIRS)
set(
YACMA_PYTHON_INCLUDE_DIR "${Python_INCLUDE_DIRS}"
CACHE PATH "Path to the Python include dir."
)
endif()

if(_YACMA_PYTHON_MODULE_NEED_LINK)
# NOTE: this will give us both the Python lib and the Python include dir.
find_package(PythonLibs REQUIRED)
Expand Down

0 comments on commit 05ed975

Please sign in to comment.