[tmxparser] Update to master (#28139)

* [tmxparser] Update to master

* version

* Remove from baseline

* Disable Werror

* version

* Fix cmake

* version
This commit is contained in:
Thomas1664 2022-12-14 02:43:28 +01:00 committed by GitHub
parent eaa1227aaf
commit af031ae388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 58 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69a0df0..5bb8de6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,7 @@ target_compile_options(tmxparser
PRIVATE -Werror=strict-prototypes
PRIVATE -Werror=old-style-definition
PRIVATE -Werror=missing-prototypes)
-if(NOT USE_MINIZ)
+if(0)
target_compile_options(tmxparser
PRIVATE -Werror)
endif()

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69a0df0..43e5dd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ project(tmxparser)
include(GNUInstallDirs)
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_MODULE_PATH})
+#set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_MODULE_PATH})
set(TMXPARSER_VERSION_MAJOR 2)
set(TMXPARSER_VERSION_MINOR 1)
@@ -25,9 +25,9 @@ option(BUILD_TESTS "Build tests. (default: OFF)" OFF)
option(BUILD_DOCS "Build documentation. (default: OFF)" OFF)
#Dependencies Settings
-include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/deps.cmake)
+#include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/deps.cmake)
-find_package(tinyxml2 REQUIRED)
+find_package(tinyxml2 CONFIG REQUIRED)
if(NOT USE_MINIZ)
find_package(ZLIB) #<-- build it as external project?
@@ -115,7 +115,7 @@ target_compile_features(tmxparser
PRIVATE cxx_std_11)
target_link_libraries(tmxparser
- PRIVATE tinyxml2)
+ PRIVATE tinyxml2::tinyxml2)
if(NOT USE_MINIZ)
target_link_libraries(tmxparser

View File

@ -1,22 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d06cb4..593bbfd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,8 @@ endif (NOT USE_MINIZ)
set(EXAMPLE_CFLAGS "-std=c++11 -pedantic -Werror -Wall -g")
#include_directories("${PROJECT_SOURCE_DIR}/include")
+include_directories("${PROJECT_BINARY_DIR}")
+include_directories("${PROJECT_SOURCE_DIR}/src")
add_library(tmxparser_static STATIC ${SOURCES} ${HEADERS})
set_target_properties(tmxparser_static PROPERTIES
@@ -67,8 +69,6 @@ add_executable(run_tests test/test.cpp)
set_target_properties(run_tests PROPERTIES
COMPILE_FLAGS ${EXAMPLE_CFLAGS})
target_link_libraries(run_tests tmxparser ${TINYXML2_LIBRARIES})
-include_directories("${PROJECT_BINARY_DIR}")
-include_directories("${PROJECT_SOURCE_DIR}/src")
install(FILES ${HEADERS} DESTINATION include/tmxparser)
install(TARGETS tmxparser tmxparser_static DESTINATION lib)

View File

@ -1,39 +1,29 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sainteos/tmxparser
REF v2.1.0
REF d314b3115c7ed86a939eefcb6009a495f043a346 # 2019-10-14
HEAD_REF master
SHA512 011cce3bb98057f8e2a0a82863fedb7c4b9e41324d5cfa6daade4d000c3f6c8c157da7b153f7f2564ecdefe8019fc8446c9b1b8a675be04329b04a0891ee1c27
SHA512 b4c087ae46b02b632427d8e4af1b5b8c43ab4f1efba21d2d705e1501aa8f33b97e03bf4e621ad4d4e14c19b1c890416332a56a2305c81930facfb8954bedee26
PATCHES
fix_include_paths.patch
fix_dependencies.patch
disable_werror.patch # https://github.com/microsoft/vcpkg/pull/28139#issuecomment-1336119855
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
"${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
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_fixup_pkgconfig()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,10 +1,19 @@
{
"name": "tmxparser",
"version-string": "2.1.0",
"port-version": 6,
"version-date": "2019-10-14",
"description": "C++11 library for parsing the maps generated by the Map Editor called Tiled.",
"license": "BSD-2-Clause",
"supports": "!windows",
"dependencies": [
"tinyxml2",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}

View File

@ -1063,13 +1063,6 @@ tinkerforge:arm-uwp=fail
tinkerforge:x64-uwp=fail
tiny-process-library:arm-uwp=fail
tiny-process-library:x64-uwp=fail
tmxparser:arm64-windows=fail
tmxparser:arm-uwp=fail
tmxparser:x64-uwp=fail
tmxparser:x64-windows=fail
tmxparser:x64-windows-static=fail
tmxparser:x64-windows-static-md=fail
tmxparser:x86-windows=fail
torch-th:arm64-windows=fail
torch-th:arm-uwp=fail
torch-th:x64-uwp=fail

View File

@ -7569,8 +7569,8 @@
"port-version": 1
},
"tmxparser": {
"baseline": "2.1.0",
"port-version": 6
"baseline": "2019-10-14",
"port-version": 0
},
"toml11": {
"baseline": "3.7.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a3ac6698af14ebaa58de6ad3d5173ea54dc94ba9",
"version-date": "2019-10-14",
"port-version": 0
},
{
"git-tree": "a0f3908517c6bf7656418385bb0fff72314a2a4e",
"version-string": "2.1.0",