aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)