[gumbo] html parser init

This commit is contained in:
atkawa7 2017-09-02 16:35:59 -07:00
parent 8fac93e539
commit 520b3b3907
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 3.8.0)
project(gumbo)
set(gumbo_srcs
src/attribute.c
src/char_ref.c
src/error.c
src/parser.c
src/string_buffer.c
src/string_piece.c
src/tag.c
src/tokenizer.c
src/utf8.c
src/util.c
src/vector.c
)
include_directories(visualc/include src)
add_library(gumbo ${gumbo_srcs})
install(
TARGETS gumbo
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES src/gumbo.h DESTINATION include)
endif()

3
ports/gumbo/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: gumbo
Version: 0.10.1
Description: An HTML5 parsing library in pure C99

View File

@ -0,0 +1,24 @@
include(vcpkg_common_functions)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(WARNING "Dynamic not supported building static")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/gumbo-parser
REF v0.10.1
SHA512 bb1fb55cd07076ab6a9f38dc14db50397dbdca9a04ace4895dfba8b8cbc09038a96e26070c09c75fa929ada2e815affe233c1e2ecd8afe2aba6201647cf277d1
HEAD_REF master
)
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()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gumbo RENAME copyright)