[uriparser] init required by #1369

This commit is contained in:
atkawa7 2017-07-21 21:56:20 -07:00
parent a42da34a07
commit c2a552b4f3
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.8)
project(uriparser C CXX)
if(MSVC)
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
endif()
include_directories(include)
set(SRC
src/UriCommon.c
src/UriCommon.h
src/UriCompare.c
src/UriEscape.c
src/UriFile.c
src/UriIp4.c
src/UriIp4Base.c
src/UriIp4Base.h
src/UriNormalize.c
src/UriNormalizeBase.c
src/UriNormalizeBase.h
src/UriParse.c
src/UriParseBase.c
src/UriParseBase.h
src/UriQuery.c
src/UriRecompose.c
src/UriResolve.c
src/UriShorten.c
)
if(BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
add_library(uriparser ${SRC})
install(
TARGETS uriparser
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_HEADERS)
install(DIRECTORY include/ DESTINATION include)
endif()

3
ports/uriparser/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: uriparser
Version: 0.8.4
Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode

View File

@ -0,0 +1,22 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uriparser-0.8.4)
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceforge.net/projects/uriparser/files/Sources/0.8.4/uriparser-0.8.4.zip/download"
FILENAME "uriparser-0.8.4.zip"
SHA512 c22a98a027c4caa1d3559b1d3112f7ac567a489037d2b38f1999483f623a2e8d79fbacdc8859fe4e669a12f0f55935179f7be2f4424c61e51d1d68f6ced37185
)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/uriparser RENAME copyright)