diff --git a/Superbuild/UseBoost.cmake b/Superbuild/UseBoost.cmake index c64f3d1946..e1a337fbb3 100644 --- a/Superbuild/UseBoost.cmake +++ b/Superbuild/UseBoost.cmake @@ -26,7 +26,11 @@ if(WIN32) endif() set(boost_LIB_PREFIX "lib") else() - set(DEBUG_POSTFIX "-yd") + if(BUILD_WITH_PYTHON) + set(DEBUG_POSTFIX "-yd") + else() + set(DEBUG_POSTFIX "-d") + endif() set(boost_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX}) if(${arm64Supported}) set(PLATFORM_SUFFIX "a64") @@ -39,7 +43,11 @@ foreach(lib ${SCI_BOOST_LIBRARY}) add_library(${lib} STATIC IMPORTED GLOBAL) if((APPLE OR UNIX) AND CMAKE_BUILD_TYPE MATCHES "Debug") - set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + if(${lib} MATCHES "boost_python-mt") + set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${DEBUG_POSTFIX}-${PLATFORM_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + else() + set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}-${PLATFORM_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + endif() elseif(APPLE OR UNIX) if(${lib} MATCHES "boost_python-mt") set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt-${PLATFORM_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")