Skip to content

Commit

Permalink
Make find_package(pybind11) depend on SKIP_PYBIND11
Browse files Browse the repository at this point in the history
Signed-off-by: Crola1702 <cristobal.arroyo@ekumenlabs.com>
  • Loading branch information
Crola1702 committed Jun 7, 2023
1 parent b2425fb commit 837e78f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ FindDRI()

option(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION
"Install python modules in standard system paths in the system"
${skip_pybind11_default_value})
OFF)

option(USE_DIST_PACKAGES_FOR_PYTHON
"Use dist-packages instead of site-package to install python modules"
${skip_pybind11_default_value})
OFF)

#============================================================================
# Search for project-specific dependencies
Expand Down Expand Up @@ -205,14 +205,17 @@ else()

set(PYBIND11_PYTHON_VERSION 3)
find_package(Python3 QUIET COMPONENTS Interpreter Development)
find_package(pybind11 2.2 QUIET)

if (${pybind11_FOUND})
message (STATUS "Searching for pybind11 - found version ${pybind11_VERSION}.")
else()
IGN_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.")
message (STATUS "Searching for pybind11 - not found.")
endif()

if (NOT SKIP_PYBIND11)
find_package(pybind11 2.2 QUIET)

if (${pybind11_FOUND})
message (STATUS "Searching for pybind11 - found version ${pybind11_VERSION}.")
else()
IGN_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.")
message (STATUS "Searching for pybind11 - not found.")
endif()
endif()
endif()
# Plugin install dirs
set(IGNITION_GAZEBO_PLUGIN_INSTALL_DIR
Expand Down

0 comments on commit 837e78f

Please sign in to comment.