diff options
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 14 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 4 |
2 files changed, 6 insertions, 12 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 699f9cb1a99..56d9117e560 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -383,18 +383,10 @@ function(setup_liblinks ${FREETYPE_LIBRARY} ) - # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions - if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs - target_link_libraries(${target} ${PYTHON_LINKFLAGS}) - if(WIN32 AND NOT UNIX) - file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d") - target_link_libraries_debug(${target} "${PYTHON_LIBRARIES_DEBUG}") - target_link_libraries_optimized(${target} "${PYTHON_LIBRARIES}") - unset(PYTHON_LIBRARIES_DEBUG) - else() - target_link_libraries(${target} ${PYTHON_LIBRARIES}) - endif() + if(WITH_PYTHON) + target_link_libraries(${target} ${PYTHON_LINKFLAGS}) + target_link_libraries(${target} ${PYTHON_LIBRARIES}) endif() if(WITH_LZO AND WITH_SYSTEM_LZO) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 7b516d87f38..dce0e73cb37 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -339,6 +339,8 @@ if(WITH_PYTHON) string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) # Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) + set(PYTHON_LIBRARY_DEBUG ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.lib) + unset(_PYTHON_VERSION_NO_DOTS) # Shared includes for both vc2008 and vc2010 @@ -346,7 +348,7 @@ if(WITH_PYTHON) # uncached vars set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") - set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}") + set(PYTHON_LIBRARIES debug "${PYTHON_LIBRARY_DEBUG}" optimized "${PYTHON_LIBRARY}" ) endif() if(WITH_BOOST) |