1- <<<<<<< HEAD
2- if (${CMAKE_VERSION} VERSION_LESS "3.12.0" )
3- # TODO: remove once the minimum CMake version is increased
4- if (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug" )
5- # pybind11 logic for setting up a debug build when both a debug and release
6- # python interpreter are present in the system seems to be pretty much broken.
7- # This works around the issue.
8- set (PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES} " )
9- endif ()
10- =======
111# Detect if we are doing a standalone build of the bindings, using an external gz-math
122if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
133 cmake_minimum_required (VERSION 3.22.1 )
14- set (GZ_MATH_VER 8 )
4+ set (GZ_MATH_VER 7 )
155 project (gz-math${GZ_MATH_VER} -python VERSION ${GZ_MATH_VER} )
166 find_package (gz-math${PROJECT_VERSION_MAJOR} REQUIRED )
177 set (PROJECT_LIBRARY_TARGET_NAME "gz-math${PROJECT_VERSION_MAJOR} ::gz-math${PROJECT_VERSION_MAJOR} " )
@@ -20,6 +10,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2010 set (CMAKE_REQUIRE_FIND_PACKAGE_pybind11 TRUE )
2111 include (GNUInstallDirs )
2212 include (CTest )
13+ elseif (${CMAKE_VERSION} VERSION_LESS "3.12.0" )
14+ # TODO: remove once the minimum CMake version is increased
15+ if (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug" )
16+ # pybind11 logic for setting up a debug build when both a debug and release
17+ # python interpreter are present in the system seems to be pretty much broken.
18+ # This works around the issue.
19+ set (PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES} " )
20+ endif ()
2321endif ()
2422
2523set (PYBIND11_PYTHON_VERSION 3)
@@ -30,7 +28,6 @@ if (${pybind11_FOUND})
3028else ()
3129 message (WARNING "pybind11 is missing: Python interfaces are disabled." )
3230 return ()
33- >>>>>>> 17deea2b (Permit building python bindings separately from gz-math library (#636))
3431endif ()
3532
3633message (STATUS "Building pybind11 interfaces" )
0 commit comments