mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-28 21:50:25 +00:00
[tinyxml] add version 2.6.2
This commit is contained in:
parent
35a9d223bc
commit
2c4bc8c2db
27
ports/tinyxml/0001_use_stl.patch
Normal file
27
ports/tinyxml/0001_use_stl.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 5ca492fee93015411a0f10e0b2f1d3503bf962a1 Mon Sep 17 00:00:00 2001
|
||||
From: Mikhail Paulyshka <me@mixaill.tk>
|
||||
Date: Sun, 3 Sep 2017 21:43:36 +0300
|
||||
Subject: [PATCH] enforce STL usage
|
||||
|
||||
---
|
||||
tinyxml.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/tinyxml.h b/tinyxml.h
|
||||
index a3589e5..7195033 100644
|
||||
--- a/tinyxml.h
|
||||
+++ b/tinyxml.h
|
||||
@@ -43,6 +43,10 @@ distribution.
|
||||
#define DEBUG
|
||||
#endif
|
||||
|
||||
+#ifndef TIXML_USE_STL
|
||||
+#define TIXML_USE_STL
|
||||
+#endif
|
||||
+
|
||||
#ifdef TIXML_USE_STL
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
--
|
||||
2.12.2.windows.2
|
||||
|
25
ports/tinyxml/CMakeLists.txt
Normal file
25
ports/tinyxml/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
project(tinyxml)
|
||||
|
||||
set(HEADERS "tinyxml.h")
|
||||
|
||||
set(SOURCES "tinyxml.cpp"
|
||||
"tinyxmlerror.cpp"
|
||||
"tinyxmlparser.cpp"
|
||||
)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared libs" OFF)
|
||||
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
add_library(tinyxml ${SOURCES})
|
||||
target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL")
|
||||
|
||||
install(
|
||||
TARGETS tinyxml
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION include)
|
3
ports/tinyxml/CONTROL
Normal file
3
ports/tinyxml/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: tinyxml
|
||||
Version: 2.6.2-1
|
||||
Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.
|
20
ports/tinyxml/License.txt
Normal file
20
ports/tinyxml/License.txt
Normal file
@ -0,0 +1,20 @@
|
||||
TinyXML is released under the zlib license:
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
30
ports/tinyxml/portfile.cmake
Normal file
30
ports/tinyxml/portfile.cmake
Normal file
@ -0,0 +1,30 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz"
|
||||
FILENAME "tinyxml_2_6_2.tar.gz"
|
||||
SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright)
|
Loading…
Reference in New Issue
Block a user