mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-19 03:35:28 +08:00
431dcee145
* [libmicrohttpd] Update to version 0.9.77 * [libmicrohttpd] Remove unneeded dependency Gettext is used by upstream only to build files for distribution. Gettext is not used by the library itself. * [libmicrohttpd] Add ARM support The ARM is supported by upstream for a long time, VC support for ARM was added in the version 0.9.77. * [libmicrohttpd] Use universal project for VC builds * [libmicrohttpd] Exclude wrong lib headers * [libmicrohttpd] Support release/debug for non-VC builds * [libmicrohttpd] Add license * [libmicrohttpd] Add "https" feature * [libmicrohttpd] Use right function for license file * [libmicrohttpd] Fix "supports" libmicrohttpd VC projects support only static library with static runtime or dynamic library with dynamic runtime * [libmicrohttpd] Update version database
60 lines
2.0 KiB
CMake
60 lines
2.0 KiB
CMake
vcpkg_download_distfile(ARCHIVE
|
|
URLS
|
|
"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
|
|
)
|
|
|
|
vcpkg_extract_source_archive(
|
|
SOURCE_PATH
|
|
ARCHIVE "${ARCHIVE}"
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
set(CFG_SUFFIX "dll")
|
|
else()
|
|
set(CFG_SUFFIX "static")
|
|
endif()
|
|
|
|
vcpkg_install_msbuild(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
PROJECT_SUBPATH w32/VS-Any-Version/libmicrohttpd.vcxproj
|
|
RELEASE_CONFIGURATION "Release-${CFG_SUFFIX}"
|
|
DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}"
|
|
)
|
|
|
|
file(GLOB MICROHTTPD_HEADERS "${SOURCE_PATH}/src/include/microhttpd.h")
|
|
file(COPY ${MICROHTTPD_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
else()
|
|
vcpkg_list(SET config_args)
|
|
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()
|
|
if("https" IN_LIST FEATURES)
|
|
vcpkg_list(APPEND config_args "--enable-https")
|
|
else()
|
|
vcpkg_list(APPEND config_args "--disable-https")
|
|
endif()
|
|
|
|
vcpkg_configure_make(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
--disable-doc
|
|
--disable-nls
|
|
--disable-examples
|
|
--disable-curl
|
|
${config_args}
|
|
OPTIONS_DEBUG --enable-asserts
|
|
OPTIONS_RELEASE --disable-asserts
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
endif()
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|