Add CMake code to download the curl dependency on Windows.

Part 2 of a series of commits that will get CMake to configure,
download, and link against the curl dependency only on the Windows
platform.

This commit will add code that will actually download the curl
dependency.

Review: https://reviews.apache.org/r/36969


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cf9740af
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cf9740af
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cf9740af

Branch: refs/heads/master
Commit: cf9740af117660315ae5a880615958fe8676fbb7
Parents: 6a30e01
Author: Alex Clemmer <[email protected]>
Authored: Sat Aug 1 15:15:36 2015 -0700
Committer: Benjamin Hindman <[email protected]>
Committed: Sat Aug 1 15:15:36 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/CMakeLists.txt | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/cf9740af/3rdparty/libprocess/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/CMakeLists.txt 
b/3rdparty/libprocess/3rdparty/CMakeLists.txt
index d7c6dfb..711809e 100644
--- a/3rdparty/libprocess/3rdparty/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/CMakeLists.txt
@@ -41,6 +41,12 @@ else (REBUNDLED)
   set(LIBEV_URL       
https://github.com/apache/mesos/raw/master/3rdparty/libprocess/3rdparty/libev-${LIBEV_VERSION}.tar.gz)
 endif (REBUNDLED)
 
+if (WIN32)
+  # TODO(hausdorff): points at a random tarball in my (hausdorff's) repository.
+  # We need a more permanent solution for this eventually.
+  set(CURL_URL 
https://github.com/hausdorff/3rdparty/raw/master/curl-static-${CURL_VERSION}.tar.gz)
+endif (WIN32)
+
 # DEFINE BUILD/PATCH/CONFIGURE COMMANDS FOR THIRD-PARTY LIBS.
 #############################################################
 if (NOT WIN32)
@@ -127,6 +133,22 @@ ExternalProject_Add(
   URL               ${LIBEV_URL}
   )
 
+# WINDOWS THIRD-PARTY LIBRARIES. Windows has no package manager, so we download
+# them here.
+###############################################################################
+if (WIN32)
+  # TODO(hausdorff): maybe try to incorporate this into findpackage for Windows
+  ExternalProject_Add(
+    ${CURL_TARGET}
+    PREFIX            "${CURL_CMAKE_ROOT}"
+    PATCH_COMMAND     ""
+    CONFIGURE_COMMAND ""
+    BUILD_COMMAND     ""
+    INSTALL_COMMAND   ""
+    URL               ${CURL_URL}
+  )
+endif (WIN32)
+
 # THIRD-PARTY LIBRARIES FOR TESTS.
 ##################################
 if (REBUNDLED)

Reply via email to