Hi Robert,

Here is a fix to the curl plugin CMake to allow it to link against the
CURL_LIBRARY_DEBUG and ZLIB_LIBRARY_DEBUG.  Previously it linked the
debug version against the release libs, which was causing a hang when
running in debug mode on Windows.

Thanks,

Jason
OPTION(CURL_IS_STATIC "on if curl is a static lib " ON)
MARK_AS_ADVANCED(CURL_IS_STATIC)

IF(WIN32)
    SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} 
/NODEFAULTLIB:MSVCRT")
ENDIF()

IF(ZLIB_FOUND)
    ADD_DEFINITIONS(-DUSE_ZLIB)
    INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
ELSE()
    INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} )
ENDIF()


SET(TARGET_SRC
    ReaderWriterCURL.cpp
)

SET(TARGET_H
    ReaderWriterCURL.h
)

IF(ZLIB_FOUND)   
    SET(TARGET_LIBRARIES_VARS
        CURL_LIBRARY
                ZLIB_LIBRARY)
ELSE()
    SET(TARGET_LIBRARIES_VARS
            CURL_LIBRARY)
ENDIF()

IF(WIN32 OR MINGW)
    IF(CURL_IS_STATIC)
        ADD_DEFINITIONS(-DCURL_STATICLIB)
        SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm 
wldap32)
    ENDIF()
ENDIF()

#### end var setup  ###
SETUP_PLUGIN(curl)
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to