2020-06-24 04:38:30 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2020-06-24 04:38:30 +08:00
|
|
|
set(MICROHTTPD_VERSION 0.9.63)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2017-09-03 11:11:30 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-07-21 09:02:45 +08:00
|
|
|
URLS
|
|
|
|
"https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
|
|
|
|
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
|
2020-01-07 06:33:00 +08:00
|
|
|
FILENAME "libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz"
|
2019-05-16 07:12:20 +08:00
|
|
|
SHA512 cb99e7af84fb6d7c0fd3894a9dc0fbff14959b35347506bd3211a65bbfad36455007b9e67493e97c9d8394834408df10eeabdc7758573e6aae0ba6f5f87afe17
|
2017-09-03 11:11:30 +08:00
|
|
|
)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-24 04:38:30 +08:00
|
|
|
PATCHES fix-msvc-project.patch
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2017-09-03 11:11:30 +08:00
|
|
|
|
2020-06-24 04:38:30 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
2020-07-21 09:02:45 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
set(CFG_SUFFIX "dll")
|
2020-06-24 04:38:30 +08:00
|
|
|
else()
|
2020-07-21 09:02:45 +08:00
|
|
|
set(CFG_SUFFIX "static")
|
2020-06-24 04:38:30 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_install_msbuild(
|
2020-07-21 09:02:45 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-06-24 04:38:30 +08:00
|
|
|
PROJECT_SUBPATH w32/VS2015/libmicrohttpd.vcxproj
|
2020-07-21 09:02:45 +08:00
|
|
|
RELEASE_CONFIGURATION "Release-${CFG_SUFFIX}"
|
|
|
|
DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}"
|
2020-06-24 04:38:30 +08:00
|
|
|
)
|
|
|
|
|
2020-07-21 09:02:45 +08:00
|
|
|
file(GLOB MICROHTTPD_HEADERS ${SOURCE_PATH}/src/include/microhttpd*.h)
|
|
|
|
file(COPY ${MICROHTTPD_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
2020-06-24 04:38:30 +08:00
|
|
|
else()
|
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|