diff options
| author | Jan HrubĂ˝ <jhruby.web@gmail.com> | 2017-03-13 08:56:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-13 08:56:05 +0100 |
| commit | 665f4118f603c5858217ed7a2f2f824b18ff4fc5 (patch) | |
| tree | f0167041edf71e90f2331b5025f603392a8de67a /ports/http-parser | |
| parent | 1bec0fcb73073b5b1719f454c368a63f1bff625e (diff) | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.tar.gz vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.zip | |
Merge pull request #1 from Microsoft/master
pull
Diffstat (limited to 'ports/http-parser')
| -rw-r--r-- | ports/http-parser/CMakeLists.txt | 21 | ||||
| -rw-r--r-- | ports/http-parser/CONTROL | 3 | ||||
| -rw-r--r-- | ports/http-parser/portfile.cmake | 29 |
3 files changed, 53 insertions, 0 deletions
diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt new file mode 100644 index 000000000..d959fff79 --- /dev/null +++ b/ports/http-parser/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required (VERSION 3.4) +project (http-parser) + +if (BUILD_SHARED_LIBS) + SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +if(CMAKE_BUILD_TYPE MATCHES "Release") + add_definitions(-DHTTP_PARSER_STRICT=0) +endif() + +add_library(http_parser http_parser.c http_parser.h) + +install(TARGETS http_parser + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" + ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" +) + +if (NOT SKIP_INSTALL_HEADERS) + install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include") +endif()
\ No newline at end of file diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL new file mode 100644 index 000000000..605f3354c --- /dev/null +++ b/ports/http-parser/CONTROL @@ -0,0 +1,3 @@ +Source: http-parser +Version: 2.7.1-1 +Description: HTTP Parser.
\ No newline at end of file diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake new file mode 100644 index 000000000..728293eed --- /dev/null +++ b/ports/http-parser/portfile.cmake @@ -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)
\ No newline at end of file |
