Revert "Update to 7.40.1"
[platform/upstream/curl.git] / lib / CMakeLists.txt
index 517ffcf..b2bcf09 100644 (file)
@@ -18,18 +18,18 @@ if(MSVC)
 endif()
 
 # SET(CSOURCES
-# # curl_memdebug.c -not used
-# # curl_nwlib.c - Not used
-# # curl_strtok.c - specify later
-# # curl_strtoofft.c - specify later
+# #  memdebug.c -not used
+# # nwlib.c - Not used
+# # strtok.c - specify later
+# # strtoofft.c - specify later
 # )
 
 # # if we have Kerberos 4, right now this is never on
 # #OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
 # IF(CURL_KRB4)
 # SET(CSOURCES ${CSOURCES}
-# curl_krb4.c
-# curl_security.c
+# krb4.c
+# security.c
 # )
 # ENDIF(CURL_KRB4)
 
@@ -37,33 +37,33 @@ endif()
 # MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
 # IF(CURL_MALLOC_DEBUG)
 # SET(CSOURCES ${CSOURCES}
-# curl_memdebug.c
+# memdebug.c
 # )
 # ENDIF(CURL_MALLOC_DEBUG)
 
 # # only build compat strtoofft if we need to
 # IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
 # SET(CSOURCES ${CSOURCES}
-# curl_strtoofft.c
+# strtoofft.c
 # )
 # ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
 
 if(HAVE_FEATURES_H)
   set_source_files_properties(
-    curl_cookie.c
-    curl_easy.c
-    curl_formdata.c
-    curl_getenv.c
-    curl_nonblock.c
-    curl_hash.c
-    curl_http.c
-    curl_if2ip.c
-    curl_mprintf.c
-    curl_multi.c
-    curl_sendf.c
-    curl_telnet.c
-    curl_transfer.c
-    curl_url.c
+    cookie.c
+    easy.c
+    formdata.c
+    getenv.c
+    nonblock.c
+    hash.c
+    http.c
+    if2ip.c
+    mprintf.c
+    multi.c
+    sendf.c
+    telnet.c
+    transfer.c
+    url.c
     COMPILE_FLAGS -D_BSD_SOURCE)
 endif(HAVE_FEATURES_H)
 
@@ -94,6 +94,10 @@ add_library(
   ${HHEADERS} ${CSOURCES}
   )
 
+if(MSVC AND CURL_STATICLIB)
+  set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+endif()
+
 target_link_libraries(${LIB_NAME} ${CURL_LIBS})
 
 if(WIN32)
@@ -108,14 +112,6 @@ setup_curl_dependencies(${LIB_NAME})
 set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
 set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "")
 
-if(MSVC)
-  if(NOT BUILD_RELEASE_DEBUG_DIRS)
-    # Ugly workaround to remove the "/debug" or "/release" in each output
-    set_target_properties(${LIB_NAME} PROPERTIES PREFIX "../")
-    set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
-  endif()
-endif()
-
 if(WIN32)
   if(NOT CURL_STATICLIB)
     # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"