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"
|
2024-03-08 14:41:29 +08:00
|
|
|
SHA512 c99b8b93cae5feee8debcc5667ee3ff043412a84b30696fe852e6c138f3c890bb43c8fcd7199f1d2f809d522fef159e83b607c743d6cf3401a57050fbdf9b5c1
|
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}"
|
2023-08-17 03:57:23 +08:00
|
|
|
PATCHES remove_pdb_install.patch
|
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()
|
|
|
|
|
2023-08-17 03:57:23 +08:00
|
|
|
vcpkg_msbuild_install(
|
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")
|