Changeset 11054

Show
Ignore:
Timestamp:
02/11/10 12:13:01 (5 years ago)
Author:
robert
Message:

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."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgDB/CMakeLists.txt

    r10990 r11054  
    127127    ADD_DEFINITIONS( -DUSE_ZLIB ) 
    128128    INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} ) 
    129     SET(COMPRESSION_LIBRARIES ${ZLIB_LIBRARY}) 
     129    SET(COMPRESSION_LIBRARIES ZLIB_LIBRARY) 
    130130ENDIF() 
    131131 
     
    136136    OpenThreads 
    137137) 
    138 LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES} ${COMPRESSION_LIBRARIES}) 
     138LINK_EXTERNAL(${LIB_NAME} ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES}) 
     139LINK_WITH_VARIABLES(${LIB_NAME} ${COMPRESSION_LIBRARIES}) 
    139140LINK_CORELIB_DEFAULT(${LIB_NAME}) 
    140141