Skip to content

Commit

Permalink
Disable pybind11 on Windows by default (#2005)
Browse files Browse the repository at this point in the history
Signed-off-by: Crola1702 <[email protected]>
  • Loading branch information
Crola1702 authored Jun 12, 2023
1 parent c0a7428 commit 090402e
Showing 1 changed file with 23 additions and 9 deletions.
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)
set(skip_pybind11_default_value ON)
endif()

option(SKIP_PYBIND11
"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}.")
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

0 comments on commit 090402e

Please sign in to comment.