mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 09:43:02 +08:00
[gumbo] html parser init
This commit is contained in:
parent
8fac93e539
commit
520b3b3907
32
ports/gumbo/CMakeLists.txt
Normal file
32
ports/gumbo/CMakeLists.txt
Normal 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
3
ports/gumbo/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: gumbo
|
||||
Version: 0.10.1
|
||||
Description: An HTML5 parsing library in pure C99
|
24
ports/gumbo/portfile.cmake
Normal file
24
ports/gumbo/portfile.cmake
Normal 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)
|
Loading…
Reference in New Issue
Block a user