mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-01 13:37:55 +08:00
Adding http-parser library
This commit is contained in:
parent
b706e4b93a
commit
89314e0132
22
ports/http-parser/CMakeLists.txt
Normal file
22
ports/http-parser/CMakeLists.txt
Normal file
@ -0,0 +1,22 @@
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
project (http-parser)
|
||||
|
||||
set(PUBLIC_HDRS
|
||||
http_parser.h
|
||||
)
|
||||
set(PRIVATE_HDRS
|
||||
)
|
||||
set(SRCS
|
||||
http_parser.c
|
||||
)
|
||||
|
||||
add_library(http_parser STATIC ${SRCS} ${PUBLIC_HDRS} ${PRIAVTE_HDRS})
|
||||
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
||||
install(TARGETS http_parser
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" )
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
|
||||
install(FILES ${PUBLIC_HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
|
||||
endif()
|
3
ports/http-parser/CONTROL
Normal file
3
ports/http-parser/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: http-parser
|
||||
Version: 2.7.1
|
||||
Description: HTTP Parser.
|
29
ports/http-parser/portfile.cmake
Normal file
29
ports/http-parser/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
# Common Ambient Variables:
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
||||
# PORT is the current port name (zlib, etc)
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
#
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/http-parser-2.7.1)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URLS "https://github.com/nodejs/http-parser/archive/v2.7.1.zip"
|
||||
FILENAME "http-parser-2.7.1.zip"
|
||||
SHA512 9fb8b855ba7edb47628c91ac062d7ffce9c4bb8d6b8237d861d7926af989fb3e354c113821bdab1b8ac910f5f1064ca1339947aa20d56f6806b919b0cd6b6eae
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS_DEBUG
|
||||
-DSKIP_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright)
|
Loading…
x
Reference in New Issue
Block a user