-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libxmlmm ] Add new port libxmlmm 0.6.0 (#13139)
- Loading branch information
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |