From 58fd865744011a24179a2dab61056d1cecdd0cc6 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Tue, 26 Jan 2010 22:49:59 +0000 Subject: [PATCH] CMake: fix MSVC debug build crash at startup when ffmpeg enabled. A wrong libraries link order was causing this problem for some reason. Since a sorting algorithm for linked libraries was already implemented in Unix, I just enabled it for Windows. Note about CMake 2.6.0: The Link Library Dependencies option (Linker General settings panel) is automatically enabled, which causes the Blender libraries to be linked twice because CMake will also add them in the Additional Dependencies field. CMake 2.8.0 does not have this problem, please upgrade if you are still using CMake 2.6.0. --- source/creator/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 55d567fbdaa..d6938aa958c 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -354,7 +354,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") -IF(UNIX) +#IF(UNIX) # Sort libraries SET(BLENDER_SORTED_LIBS bf_windowmanager @@ -451,8 +451,8 @@ IF(UNIX) ENDIF(REMLIB) ENDFOREACH(SORTLIB) TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS}) -ELSE(UNIX) - TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS}) -ENDIF(UNIX) +#ELSE(UNIX) +# TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS}) +#ENDIF(UNIX) SETUP_LIBLINKS(blender)