Skip to content

Commit 2b96738

Browse files
committed
build: don't fail pybind11 search if python is disabled (#4136)
Fixes #4135 Thanks to @OgreTransporter for the suggestion. Signed-off-by: Larry Gritz <[email protected]>
1 parent dbab4df commit 2b96738

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cmake/externalpackages.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ endif()
158158

159159
# From pythonutils.cmake
160160
find_python()
161-
162-
checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2)
161+
if (USE_PYTHON)
162+
checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2)
163+
endif ()
163164

164165

165166
###########################################################################

0 commit comments

Comments
 (0)