Fix link libraries for Win32 Cmake debug build. Unfortunately, debug builds are still...
authorBenoit Bolsee <benoit.bolsee@online.be>
Sun, 17 Jan 2010 19:19:15 +0000 (19:19 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Sun, 17 Jan 2010 19:19:15 +0000 (19:19 +0000)
CMake/macros.cmake
source/creator/CMakeLists.txt

index 258cbdf57b688a6ea0563084196ef4e76567688f..1e8fe391918b69b21bd364dbeeb4f57ea4d6cbd9 100644 (file)
@@ -135,15 +135,35 @@ MACRO(SETUP_LIBLINKS
     TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
   ENDIF(WITH_QUICKTIME)
   IF(WITH_OPENEXR)
-    TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
+    IF(WIN32)
+      FOREACH(loop_var ${OPENEXR_LIB})
+        TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
+        TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
+      ENDFOREACH(loop_var)
+    ELSEIF(WIN32)
+      TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
+    ENDIF(WIN32)
   ENDIF(WITH_OPENEXR)
   IF(WITH_FFMPEG)
     TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
   ENDIF(WITH_FFMPEG)
   IF(WITH_OPENCOLLADA)
-    TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
-    TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
-    TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
+    IF(WIN32)
+      FOREACH(loop_var ${OPENCOLLADA_LIB})
+        TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
+        TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
+      ENDFOREACH(loop_var)
+      TARGET_LINK_LIBRARIES(${target} debug ${PCRE_LIB}_d)
+      TARGET_LINK_LIBRARIES(${target} optimized ${PCRE_LIB})
+      IF(EXPAT_LIB)
+        TARGET_LINK_LIBRARIES(${target} debug ${EXPAT_LIB}_d)
+        TARGET_LINK_LIBRARIES(${target} optimized ${EXPAT_LIB})
+      ENDIF(EXPAT_LIB)
+    ELSE(WIN32)
+         TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
+      TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
+      TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
+    ENDIF(WIN32)
   ENDIF(WITH_OPENCOLLADA)
   IF(WIN32)
     TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
index a11e83c931279d10029ac8051d739f7284329bfb..55d567fbdaa97e6d87a78e23ff7117014d7f63b3 100644 (file)
@@ -273,6 +273,7 @@ IF(WITH_INSTALL)
                        POST_BUILD
                        MAIN_DEPENDENCY blender
                        COMMAND copy /Y \"${WIN_LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\\"
+                       COMMAND copy /Y \"${WIN_LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\python31_d.zip\"
                        COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\"
                        COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\"
                        COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\"