aboutsummaryrefslogtreecommitdiff
path: root/ports/tinyxml2
diff options
context:
space:
mode:
authorAlexander Saprykin <xelfium@gmail.com>2018-05-26 13:27:14 +0200
committerGitHub <noreply@github.com>2018-05-26 13:27:14 +0200
commit4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch)
treed95c9490352eb73f078d34a33bc4bb44ac9fa48b /ports/tinyxml2
parentfb689bd13dd6ba563a885d71fff1dd2b32a615db (diff)
parent2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff)
downloadvcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz
vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'ports/tinyxml2')
-rw-r--r--ports/tinyxml2/CONTROL4
-rw-r--r--ports/tinyxml2/portfile.cmake37
-rw-r--r--ports/tinyxml2/vcpkg-cmake-wrapper.cmake5
3 files changed, 33 insertions, 13 deletions
diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL
index b8bf3d76a..185fa749c 100644
--- a/ports/tinyxml2/CONTROL
+++ b/ports/tinyxml2/CONTROL
@@ -1,3 +1,3 @@
Source: tinyxml2
-Version: 3.0.0
-Description: A simple, small, efficient, C++ XML parser \ No newline at end of file
+Version: 6.2.0
+Description: A simple, small, efficient, C++ XML parser
diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake
index 656f4783f..8a28b424b 100644
--- a/ports/tinyxml2/portfile.cmake
+++ b/ports/tinyxml2/portfile.cmake
@@ -1,22 +1,37 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml2-3.0.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/leethomason/tinyxml2/archive/3.0.0.zip"
- FILENAME "tinyxml2-3.0.0.zip"
- SHA512 3581e086e41ea01418fdf74e53b932c41cada9a45b73fb71c15424672182dc2a1e55110f030962ae44df6f5d9f060478c5b04373f886da843a78fcabae8b063c
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO leethomason/tinyxml2
+ REF 6.2.0
+ SHA512 ef784240aeb090ab04aad659352ad4b224c431feecf485f33aca7936bcaa0ef4ab9d0a2e0692d3cf6036ac3e8012019d65665e780a920bbad3d4820f736445b1
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(BUILD_STATIC_LIBS 1)
+else()
+ set(BUILD_STATIC_LIBS 0)
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ OPTIONS
+ -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyxml2")
+
+vcpkg_copy_pdbs()
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(COPY ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(COPY
+ ${SOURCE_PATH}/readme.md
+ ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2
+)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright)
-vcpkg_copy_pdbs()
diff --git a/ports/tinyxml2/vcpkg-cmake-wrapper.cmake b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..867426f1e
--- /dev/null
+++ b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,5 @@
+_find_package(${ARGS})
+if(TARGET tinyxml2_static AND NOT TARGET tinyxml2)
+ _add_library(tinyxml2 INTERFACE IMPORTED)
+ set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static")
+endif()