From b18c9044122b0fbe7cc6c81efb48d0be8e065a23 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 6 Nov 2014 15:31:38 -0500 Subject: curl: Drop inclusion of .rc file for static lib The resource file is only needed for the curl .dll, so skip it when building the static library. This avoids the need to add the '/machine:' link flag on MS tools for creating a static library. --- Utilities/cmcurl/lib/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Utilities/cmcurl/lib/CMakeLists.txt b/Utilities/cmcurl/lib/CMakeLists.txt index b2bcf09..3d5c3e3 100644 --- a/Utilities/cmcurl/lib/CMakeLists.txt +++ b/Utilities/cmcurl/lib/CMakeLists.txt @@ -13,7 +13,7 @@ list(APPEND HHEADERS ${CURL_BINARY_DIR}/include/curl/curlbuild.h ) -if(MSVC) +if(MSVC AND NOT CURL_STATICLIB) list(APPEND CSOURCES libcurl.rc) endif() @@ -94,10 +94,6 @@ 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) -- cgit v0.12