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.
This commit is contained in:
Benoit Bolsee 2010-01-26 22:49:59 +00:00
parent 709b1a93e6
commit 58fd865744

@ -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)