[tmxlite] Fixes and Update to 1.4.4 (#35760)

This commit is contained in:
Thomas1664 2023-12-18 22:27:22 +01:00 коммит произвёл GitHub
Родитель e45bb5052f
Коммит c36e905c05
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 65 добавлений и 14 удалений

Просмотреть файл

@ -0,0 +1,29 @@
diff --git a/tmxlite/CMakeLists.txt b/tmxlite/CMakeLists.txt
index a1b1882..8c0aad6 100644
--- a/tmxlite/CMakeLists.txt
+++ b/tmxlite/CMakeLists.txt
@@ -68,10 +68,9 @@ if(USE_EXTLIBS)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
find_package(ZLIB REQUIRED)
- find_package(PUGIXML REQUIRED)
- find_package(Zstd REQUIRED)
+ find_package(pugixml CONFIG REQUIRED)
+ find_package(zstd CONFIG REQUIRED)
- include_directories(${ZLIB_INCLUDE_DIRS} ${PUGIXML_INCLUDE_DIR} ${ZSTD_INCLUDE_DIR})
else()
#add miniz and pugixml from source
@@ -102,7 +101,10 @@ else()
endif()
if(USE_EXTLIBS)
- target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES} ${PUGIXML_LIBRARY} ${ZSTD_LIBRARY})
+ target_link_libraries(${PROJECT_NAME} PRIVATE
+ $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>
+ pugixml::pugixml
+ ZLIB::ZLIB)
else()
if(USE_ZSTD)
target_link_libraries(${PROJECT_NAME} ${ZSTD_LIBRARY})

Просмотреть файл

@ -1,21 +1,38 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fallahn/tmxlite
REF v1.3.0
REF "v${VERSION}"
HEAD_REF master
SHA512 3D432152080F7FDDD14A150FF87C34932695C96D7F676399C7610FF373972223CE54C9483BD9A872FD53668C113E334FCBF8596AE21CFDAF83B6159C7287A4A3
SHA512 0ffe0505329f00ef9872998673a7c220a9a5352f830688ef17952c0c4f001e0c2994a3a28f0e7de60cc82fff2701561cccbc2143fd51984bf4870e7d1fd0a2ba
PATCHES
dependencies.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TMXLITE_STATIC_LIB)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/tmxlite"
OPTIONS
-DTMXLITE_STATIC_LIB=${TMXLITE_STATIC_LIB}
-DUSE_EXTLIBS=ON
-DPKGCONF_REQ_PUB=pugixml
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
set(STATIC_POSTFIX "")
if(TMXLITE_STATIC_LIB)
set(STATIC_POSTFIX "-s")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/tmxlite.pc" "-ltmxlite" "-ltmxlite${STATIC_POSTFIX}")
endif()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/tmxlite.pc" "-ltmxlite" "-ltmxlite${STATIC_POSTFIX}-d")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -1,10 +1,11 @@
{
"name": "tmxlite",
"version": "1.3.0",
"port-version": 1,
"version": "1.4.4",
"description": "A lightweight C++14 parsing library for tmx map files created with the Tiled map editor.",
"homepage": "https://github.com/fallahn/tmxlite",
"license": "Zlib",
"dependencies": [
"pugixml",
{
"name": "vcpkg-cmake",
"host": true
@ -12,6 +13,8 @@
{
"name": "vcpkg-cmake-config",
"host": true
}
},
"zlib",
"zstd"
]
}

Просмотреть файл

@ -1152,9 +1152,6 @@ tinycthread:x64-android=fail
tlx:arm-neon-android=fail
tlx:arm64-android=fail
tlx:x64-android=fail
tmxlite:arm-neon-android=fail
tmxlite:arm64-android=fail
tmxlite:x64-android=fail
torch-th:arm-neon-android=fail
torch-th:arm64-android=fail
torch-th:arm64-windows=fail

Просмотреть файл

@ -8553,8 +8553,8 @@
"port-version": 2
},
"tmxlite": {
"baseline": "1.3.0",
"port-version": 1
"baseline": "1.4.4",
"port-version": 0
},
"tmxparser": {
"baseline": "2019-10-14",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b18995c78b7b6057c2a1d69eba2118bfcb17fa36",
"version": "1.4.4",
"port-version": 0
},
{
"git-tree": "b176cf2abbb6262dc616d68625f90f35e65fe4c1",
"version": "1.3.0",