Skip to content

Commit

Permalink
Check if pybind already exists (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshpolansky authored Sep 29, 2024
1 parent 801c5f6 commit 0c467ad
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ endif()


if(BUILD_PYTHON_MODULE)
# Check if pybind11 exists as a subdirectory
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/pybind11)
add_subdirectory(pybind11)
else()
find_package(pybind11 2.6 REQUIRED)

# check if pybind11 is already available
if(NOT TARGET pybind11::module)
# Check if pybind11 exists as a subdirectory
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/pybind11)
add_subdirectory(pybind11)
else()
find_package(pybind11 2.6 REQUIRED)
endif()
endif()

pybind11_add_module(python_ruckig src/ruckig/python.cpp)
Expand Down

0 comments on commit 0c467ad

Please sign in to comment.