2017-09-03 11:11:30 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-07-21 09:02:45 +08:00
|
|
|
URLS
|
2023-06-09 01:14:17 +08:00
|
|
|
"https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${VERSION}.tar.gz"
|
|
|
|
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${VERSION}.tar.gz"
|
|
|
|
FILENAME "libmicrohttpd-${VERSION}.tar.gz"
|
|
|
|
SHA512 001025c023dd94c4a0cf017ed575e65a577b5ce595e7e450346bfb75def77eaa8a4cfbeffb9f4b912e34165c2cfca147c02c895e067a4f6c5a321a12035758a5
|
2017-09-03 11:11:30 +08:00
|
|
|
)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2021-05-18 15:16:53 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2017-09-03 11:11:30 +08:00
|
|
|
|
2021-05-18 15:16:53 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
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}"
|
2023-06-09 01:14:17 +08:00
|
|
|
PROJECT_SUBPATH w32/VS-Any-Version/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
|
|
|
)
|
|
|
|
|
2023-06-09 01:14:17 +08:00
|
|
|
file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd.h")
|
2021-05-18 15:16:53 +08:00
|
|
|
file(COPY ${MICROHTTPD_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
2020-06-24 04:38:30 +08:00
|
|
|
else()
|
2023-06-09 01:14:17 +08:00
|
|
|
vcpkg_list(SET config_args)
|
2021-04-27 01:28:21 +08:00
|
|
|
if(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(ENV{LIBS} "$ENV{LIBS} -framework Foundation -framework AppKit") # TODO: Get this from the extracted cmake vars somehow
|
|
|
|
endif()
|
2023-06-09 01:14:17 +08:00
|
|
|
if("https" IN_LIST FEATURES)
|
|
|
|
vcpkg_list(APPEND config_args "--enable-https")
|
|
|
|
else()
|
|
|
|
vcpkg_list(APPEND config_args "--disable-https")
|
|
|
|
endif()
|
|
|
|
|
2020-06-24 04:38:30 +08:00
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-05-18 15:16:53 +08:00
|
|
|
OPTIONS
|
|
|
|
--disable-doc
|
2023-06-09 01:14:17 +08:00
|
|
|
--disable-nls
|
2021-05-18 15:16:53 +08:00
|
|
|
--disable-examples
|
|
|
|
--disable-curl
|
2023-06-09 01:14:17 +08:00
|
|
|
${config_args}
|
|
|
|
OPTIONS_DEBUG --enable-asserts
|
|
|
|
OPTIONS_RELEASE --disable-asserts
|
2020-06-24 04:38:30 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
2021-11-23 07:51:27 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2020-06-24 04:38:30 +08:00
|
|
|
|
2021-05-18 15:16:53 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-06-24 04:38:30 +08:00
|
|
|
endif()
|
|
|
|
|
2023-06-09 01:14:17 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|