summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBenoit Neil <suky0001@free.fr>2009-04-06 19:22:31 +0000
committerBenoit Neil <suky0001@free.fr>2009-04-06 19:22:31 +0000
commitedd02607e293bf8e09b0491ab204af2616e43c70 (patch)
tree06f5d78cab325c9a9bb54a344057d1f660446c95 /CMakeLists.txt
parent0211e420edc2f5759e90852dcf9bff221e6dc2bf (diff)
downloadcurl-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.txt17
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)