diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 34c25c66..9643bc5c 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,14 +1,7 @@ -<<<<<<< HEAD -if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") - # pybind11 logic for setting up a debug build when both a debug and release - # python interpreter are present in the system seems to be pretty much broken. - # This works around the issue. - set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}") -======= # Detect if we are doing a standalone build of the bindings, using an external gz-transport if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) cmake_minimum_required(VERSION 3.22.1) - set(GZ_TRANSPORT_VER 14) + set(GZ_TRANSPORT_VER 13) project(gz-transport${GZ_TRANSPORT_VER}-python VERSION ${GZ_TRANSPORT_VER}) find_package(gz-transport${PROJECT_VERSION_MAJOR} REQUIRED) set(PROJECT_LIBRARY_TARGET_NAME "gz-transport${PROJECT_VERSION_MAJOR}::gz-transport${PROJECT_VERSION_MAJOR}") @@ -17,6 +10,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(CMAKE_REQUIRE_FIND_PACKAGE_pybind11 TRUE) include(GNUInstallDirs) include(CTest) +elseif(${CMAKE_VERSION} VERSION_LESS "3.12.0") + # TODO: remove once the minimum CMake version is increased + if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") + # pybind11 logic for setting up a debug build when both a debug and release + # python interpreter are present in the system seems to be pretty much broken. + # This works around the issue. + set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}") + endif() endif() set(PYBIND11_PYTHON_VERSION 3) @@ -27,7 +28,6 @@ if (pybind11_FOUND) else() message(WARNING "pybind11 is missing: Python interfaces are disabled.") return() ->>>>>>> 250e95f0 (Permit building python bindings separately from main library (#554)) endif() if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION)