Skip to content
Snippets Groups Projects
Commit 6b244afc authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

SuperBuild: fix up curl install prefix for x86 and x64

parent 2e499cd2
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,25 @@ if(NOT APPLE)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL)
endif()
#TODO: add openssl and other dependencies
if(MSVC)
if(NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "static build or curl not supported")
endif()
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "amd64" OR
"${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AMD64" )
set(CURL_INSTALL_DIR_PREFIX "libcurl-vc-x64")
else()
set(CURL_INSTALL_DIR_PREFIX "libcurl-vc-x86")
endif()
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(CURL_INSTALL_DIR_PREFIX "${CURL_INSTALL_DIR_PREFIX}-release")
else()
set(CURL_INSTALL_DIR_PREFIX "${CURL_INSTALL_DIR_PREFIX}-debug")
endif()
ExternalProject_Add(CURL
PREFIX CURL
URL "http://curl.haxx.se/download/curl-7.40.0.tar.gz"
......@@ -23,7 +40,8 @@ if(MSVC)
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CURL_SB_SRC} ${CURL_SB_BUILD_DIR}
CONFIGURE_COMMAND ""
BUILD_COMMAND nmake /f ${CURL_SB_BUILD_DIR}/winbuild/Makefile.vc mode=dll WITH_ZLIB=dll WITH_DEVEL=${SB_INSTALL_PREFIX}
INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${CURL_SB_BUILD_DIR}/builds/ ${CMAKE_COMMAND} -E copy_directory libcurl-vc-x86-release-dll-zlib-dll-ipv6-sspi-winssl ${SB_INSTALL_PREFIX}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
${CURL_SB_BUILD_DIR}/builds/${CURL_INSTALL_DIR_PREFIX}-dll-zlib-dll-ipv6-sspi-winssl/ ${SB_INSTALL_PREFIX}
)
else(UNIX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment