aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-26 16:05:46 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-26 16:05:46 -0800
commit56581e816a7129d99e25b592035e1de5a8801178 (patch)
treecb911e9875ea9ddff5319810489c8e162837022a
parentf3783f87a6ec4b45fd17384cc7687e84bba9f479 (diff)
downloadvcpkg-56581e816a7129d99e25b592035e1de5a8801178.tar.gz
vcpkg-56581e816a7129d99e25b592035e1de5a8801178.zip
[curl] Enable static building
-rw-r--r--ports/curl/portfile.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index 8ad5ed7f7..e2359f73d 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -1,7 +1,3 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported yet. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
-endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/curl-curl-7_51_0)
vcpkg_download_distfile(ARCHIVE_FILE
@@ -11,12 +7,19 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
+if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ SET(CURL_STATICLIB OFF)
+else()
+ SET(CURL_STATICLIB ON)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_CURL_EXE=OFF
-DENABLE_MANUAL=OFF
+ -DCURL_STATICLIB=${CURL_STATICLIB}
OPTIONS_DEBUG
-DENABLE_DEBUG=ON
)
@@ -25,4 +28,9 @@ vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
vcpkg_copy_pdbs() \ No newline at end of file