cmake support for python25_d.lib in debug on win32. other platforms should work as...
authorShaul Kedem <shaul_kedem@yahoo.com>
Wed, 15 Apr 2009 13:11:08 +0000 (13:11 +0000)
committerShaul Kedem <shaul_kedem@yahoo.com>
Wed, 15 Apr 2009 13:11:08 +0000 (13:11 +0000)
CMake/macros.cmake

index 95799a2c1fdbc1189e3829dbdb53c4610ddf05e6..145e344509ee28de679b8871b996010b9c753607 100644 (file)
@@ -60,6 +60,23 @@ MACRO(SETUP_LIBLINKS
   target)
   SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
   TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
+
+  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
+
+  # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
+
+  IF(WIN32)
+
+            TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
+
+            TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
+
+            ELSE(WIN32)
+
+            TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
+
+  ENDIF(WIN32)
+
   IF(WITH_INTERNATIONAL)
     TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIB})
     TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})