added check for debug
@@ -191,7 +191,11 @@ FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
SET(curPYLIB "libpython${CV}.")
IF(WIN32)
STRING(REPLACE "." "" CV2 ${CV})
+ if (CMAKE_BUILD_TYPE STREQUAL Debug)
+ SET(curPYLIB "python${CV2}_d.lib")
+ else ()
SET(curPYLIB "python${CV2}.lib")
+ endif ()
ENDIF(WIN32)
IF(${PYLIB} MATCHES ${curPYLIB})
SET(PYTHON_VERSION ${CV})
