From Wang Rui, "Just a minor fix of the src/osgDB/CMakeLists.txt, change:
SET(COMPRESSION_LIBRARIES ${ZLIB_LIBRARY})
...
LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES})
to
SET(COMPRESSION_LIBRARIES ZLIB_LIBRARY)
...
LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES}
${COMPRESSION_LIBRARIES})
LINK_WITH_VARIABLES(${LIB_NAME} ${COMPRESSION_LIBRARIES})
I notice that the LINK_EXTERNAL macro won't distinguish between debug
and release dependences, which means that osgDB will use the release
version of zlib for all build configurations. Under Win32, this will
cause a manifest problem: all applications using osgDB may complain
"failed to start because msvcr80.dll was not found" or similar
messages.
This change will make it back to normal."
This commit is contained in:
@@ -126,7 +126,7 @@ ENDIF()
|
||||
IF( ZLIB_FOUND )
|
||||
ADD_DEFINITIONS( -DUSE_ZLIB )
|
||||
INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} )
|
||||
SET(COMPRESSION_LIBRARIES ${ZLIB_LIBRARY})
|
||||
SET(COMPRESSION_LIBRARIES ZLIB_LIBRARY)
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_MODULE_SUFFIX})
|
||||
@@ -135,7 +135,8 @@ LINK_INTERNAL(${LIB_NAME}
|
||||
osg
|
||||
OpenThreads
|
||||
)
|
||||
LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES} ${COMPRESSION_LIBRARIES})
|
||||
LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES})
|
||||
LINK_WITH_VARIABLES(${LIB_NAME} ${COMPRESSION_LIBRARIES})
|
||||
LINK_CORELIB_DEFAULT(${LIB_NAME})
|
||||
|
||||
IF( ZLIB_FOUND )
|
||||
|
||||
Reference in New Issue
Block a user