vcpkg/ports/curl/portfile.cmake

36 lines
1.1 KiB
CMake
Raw Normal View History

2016-09-18 20:50:08 -07:00
include(vcpkg_common_functions)
2016-11-05 03:17:06 -07:00
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/curl-curl-7_51_0)
2016-09-18 20:50:08 -07:00
vcpkg_download_distfile(ARCHIVE_FILE
2016-11-05 03:17:06 -07:00
URLS "https://github.com/curl/curl/archive/curl-7_51_0.tar.gz"
FILENAME "curl-7.51.0.tar.gz"
SHA512 88ec572efb1b2fb793dc26b627e54863718e774343283f0eb92022ce252f7798332d9d3f20f63e45c38576614a000abbf12570e91e14a118f150e0378f1a27e5
2016-09-18 20:50:08 -07:00
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
2016-11-26 16:05:46 -08:00
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
SET(CURL_STATICLIB OFF)
else()
SET(CURL_STATICLIB ON)
endif()
2016-09-18 20:50:08 -07:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
2016-09-18 20:50:08 -07:00
OPTIONS
-DBUILD_TESTING=OFF
2016-09-18 20:50:08 -07:00
-DBUILD_CURL_EXE=OFF
-DENABLE_MANUAL=OFF
2016-11-26 16:05:46 -08:00
-DCURL_STATICLIB=${CURL_STATICLIB}
2016-09-18 20:50:08 -07:00
OPTIONS_DEBUG
-DENABLE_DEBUG=ON
)
vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright)
2016-09-18 20:50:08 -07:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2016-11-26 16:05:46 -08:00
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
2016-09-18 20:50:08 -07:00
vcpkg_copy_pdbs()