diff options
author | Benoit Neil <suky0001@free.fr> | 2009-04-06 19:22:31 +0000 |
---|---|---|
committer | Benoit Neil <suky0001@free.fr> | 2009-04-06 19:22:31 +0000 |
commit | edd02607e293bf8e09b0491ab204af2616e43c70 (patch) | |
tree | 06f5d78cab325c9a9bb54a344057d1f660446c95 /CMakeLists.txt | |
parent | 0211e420edc2f5759e90852dcf9bff221e6dc2bf (diff) | |
download | curl-edd02607e293bf8e09b0491ab204af2616e43c70.tar.gz |
Fixed Win32 link error and disabled MSVC specific (=annoying) warnings (Reported by Bill Hoffman)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a3d2db21d..a2090e2e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,8 @@ INCLUDE_DIRECTORIES( ${CURL_SOURCE_DIR}/include ) # Save C and CXX STD libs (we may need to modify them) IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE) - SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT ${CMAKE_CXX_STANDARD_LIBRARIES}) - SET(CMAKE_C_STANDARD_LIBRARIES_INIT ${CMAKE_C_STANDARD_LIBRARIES}) + SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT ${CMAKE_CXX_STANDARD_LIBRARIES} CACHE INTERNAL "Initial C++ libs") + SET(CMAKE_C_STANDARD_LIBRARIES_INIT ${CMAKE_C_STANDARD_LIBRARIES} CACHE INTERNAL "Initial C libs") ENDIF() IF(WIN32) @@ -109,10 +109,12 @@ MARK_AS_ADVANCED(ENABLE_IPV6) IF(WIN32) IF(CURL_DISABLE_LDAP) #SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib" CACHE STRING "" FORCE) - SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib" CACHE STRING "" FORCE) + #SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib" CACHE STRING "" FORCE) + SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib ws2_32.lib" CACHE STRING "" FORCE) ELSE() #SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib wldap32.lib" CACHE STRING "" FORCE) - SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib wldap32.lib" CACHE STRING "" FORCE) + #SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib bufferoverflowu.lib ws2_32.lib wldap32.lib" CACHE STRING "" FORCE) + SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} wsock32.lib ws2_32.lib wldap32.lib" CACHE STRING "" FORCE) ENDIF() ENDIF() @@ -739,9 +741,12 @@ IF(WIN32) ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) ENDIF(WIN32) +IF(MSVC) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) +ENDIF(MSVC) -add_subdirectory(lib) -# add_subdirectory(src) +ADD_SUBDIRECTORY(lib) +# ADD_SUBDIRECTORY(src) # This needs to be run very last so other parts of the scripts can take advantage of this. IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE) |