Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable pybind11 on Windows by default #2005

Merged
merged 5 commits into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ else()
set (EXTRA_TEST_LIB_DEPS)
endif()

# We're disabling pybind11 by default on Windows because they
# don't have active CI on them for now.
set(skip_pybind11_default_value OFF)
if (MSVC)
Crola1702 marked this conversation as resolved.
Show resolved Hide resolved
set(skip_pybind11_default_value ON)
endif()

option(SKIP_PYBIND11
Crola1702 marked this conversation as resolved.
Show resolved Hide resolved
"Skip generating Python bindings via pybind11"
${skip_pybind11_default_value})

include(test/find_dri.cmake)
FindDRI()

Expand Down Expand Up @@ -196,14 +207,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}.")
Crola1702 marked this conversation as resolved.
Show resolved Hide resolved
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 All @@ -225,7 +239,7 @@ add_subdirectory(examples)
#============================================================================
ign_create_packages()

if (${pybind11_FOUND})
if (pybind11_FOUND)
add_subdirectory(python)
endif()
#============================================================================
Expand Down