root/OpenSceneGraph/trunk/src/osgPlugins/curl/CMakeLists.txt @ 10963

Revision 10963, 0.8 kB (checked in by robert, 5 years ago)

From Jean-Sebastien Guay, build fixes for Mingw

RevLine 
[8151]1OPTION(CURL_IS_STATIC "on if curl is a static lib " ON)
2MARK_AS_ADVANCED(CURL_IS_STATIC)
3
[8078]4IF(WIN32)
5    SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT")
[9998]6ENDIF()
[8078]7
[9025]8IF(ZLIB_FOUND)
9    ADD_DEFINITIONS(-DUSE_ZLIB)
[9033]10    INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
[9998]11ELSE()
[9025]12    INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} )
[9998]13ENDIF()
[7997]14
[9025]15
[10963]16SET(TARGET_SRC
[8325]17    ReaderWriterCURL.cpp
18)
[7981]19
[8325]20SET(TARGET_H
21    ReaderWriterCURL.h
22)
23
[9025]24IF(ZLIB_FOUND)
[10963]25    SET(TARGET_EXTERNAL_LIBRARIES ${CURL_LIBRARY} ${ZLIB_LIBRARY})
[9998]26ELSE()
[10963]27    SET(TARGET_EXTERNAL_LIBRARIES ${CURL_LIBRARY})
[9998]28ENDIF()
[7981]29
[10963]30IF(WIN32 OR MINGW)
31    IF(CURL_IS_STATIC)
32        ADD_DEFINITIONS(-DCURL_STATICLIB)
33        SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32)
34    ENDIF()
35ENDIF()
[8151]36
[7981]37#### end var setup  ###
38SETUP_PLUGIN(curl)
Note: See TracBrowser for help on using the browser.