aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshley Davis <SgtCoDFish@users.noreply.github.com>2018-10-20 21:17:45 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-10-20 13:17:45 -0700
commitfb4c51f997ca6396a2b30e6cd9925804d97821fc (patch)
tree43f24daff90249450868b751df832d4818ebdf26
parentdac6bba3f6681e5bd326c49d834fe024f54d5bac (diff)
downloadvcpkg-fb4c51f997ca6396a2b30e6cd9925804d97821fc.tar.gz
vcpkg-fb4c51f997ca6396a2b30e6cd9925804d97821fc.zip
Add tmxparser port (#4512)
* Add tmxparser port * [tmxparser] Keep only one flavor
-rw-r--r--ports/tmxparser/CONTROL4
-rw-r--r--ports/tmxparser/portfile.cmake37
2 files changed, 41 insertions, 0 deletions
diff --git a/ports/tmxparser/CONTROL b/ports/tmxparser/CONTROL
new file mode 100644
index 000000000..66132e4fd
--- /dev/null
+++ b/ports/tmxparser/CONTROL
@@ -0,0 +1,4 @@
+Source: tmxparser
+Version: 2.1.0-1
+Description: C++11 library for parsing the maps generated by the Map Editor called Tiled.
+Build-Depends: zlib, tinyxml2
diff --git a/ports/tmxparser/portfile.cmake b/ports/tmxparser/portfile.cmake
new file mode 100644
index 000000000..ffe58c89f
--- /dev/null
+++ b/ports/tmxparser/portfile.cmake
@@ -0,0 +1,37 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO sainteos/tmxparser
+ REF v2.1.0
+ HEAD_REF master
+ SHA512 011cce3bb98057f8e2a0a82863fedb7c4b9e41324d5cfa6daade4d000c3f6c8c157da7b153f7f2564ecdefe8019fc8446c9b1b8a675be04329b04a0891ee1c27
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/share
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/*.so* ${CURRENT_PACKAGES_DIR}/debug/lib/*.so*)
+ if(LIBS)
+ file(REMOVE ${LIBS})
+ endif()
+else()
+ file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/*.a ${CURRENT_PACKAGES_DIR}/debug/lib/*.a)
+ if(LIBS)
+ file(REMOVE ${LIBS})
+ endif()
+endif()
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tmxparser/copyright COPYONLY)