[libxmlmm ] Add new port libxmlmm 0.6.0 (#13139)

This commit is contained in:
Sean Farrell 2020-09-01 02:58:24 +02:00 committed by GitHub
parent b1bdebe4d0
commit 2045a0e1dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,59 @@
cmake_minimum_required(VERSION 3.8)
project(libxmlmm CXX)
set(CMAKE_SHARED_LIBRARY_PREFIX)
set(CMAKE_STATIC_LIBRARY_PREFIX)
find_package(LibXml2 REQUIRED)
set(HEADERS_LIBXMLMM
libxmlmm/Attribute.h
libxmlmm/CData.h
libxmlmm/Comment.h
libxmlmm/Content.h
libxmlmm/defines.h
libxmlmm/Document.h
libxmlmm/Element.h
libxmlmm/exceptions.h
libxmlmm/libxmlmm.h
libxmlmm/LibXmlSentry.h
libxmlmm/Node.h
libxmlmm/ProcessingInstruction.h
libxmlmm/Text.h
libxmlmm/utils.h
)
set(SOURCES_LIBXMLMM
libxmlmm/Attribute.cpp
libxmlmm/CData.cpp
libxmlmm/Comment.cpp
libxmlmm/Content.cpp
libxmlmm/Document.cpp
libxmlmm/Element.cpp
libxmlmm/LibXmlSentry.cpp
libxmlmm/Node.cpp
libxmlmm/ProcessingInstruction.cpp
libxmlmm/Text.cpp
libxmlmm/utils.cpp
)
add_library(libxmlmm ${SOURCES_LIBXMLMM})
include_directories(${LIBXML2_INCLUDE_DIR})
target_link_libraries (libxmlmm ${LIBXML2_LIBRARIES})
set_target_properties(libxmlmm PROPERTIES
CXX_STANDARD 17
PUBLIC_HEADER "${HEADERS_LIBXMLMM}"
)
target_include_directories(libxmlmm PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libxmlmm>
$<INSTALL_INTERFACE:include/libxmlmm>)
install(TARGETS ${PROJECT_NAME}
EXPORT litehtmlTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/libxmlmm
)

5
ports/libxmlmm/CONTROL Normal file
View File

@ -0,0 +1,5 @@
Source: libxmlmm
Version: 0.6.0
Homepage: https://github.com/rioki/libxmlmm
Description: Libxmlmm is a C++ wrapper for libxml 2.0 that only relies on standard C++ and libxml2.
Build-Depends: libxml2

View File

@ -0,0 +1,23 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rioki/libxmlmm
REF r0.6
SHA512 4f619e730de2f88b891ef31dd7ced2e6be75fff7f3852ec178843bf8d099d2e1ea84e0fcde35ff7fefc201b026f63e4b5d55f88e48334c49a0333be0327894df
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
# Handle copyright
configure_file(${SOURCE_PATH}/README.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")