Skip to content

Commit

Permalink
[tinyxml2]: check for TINYXML2_EXPORT on non windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 28, 2022
1 parent 55179ca commit c50746e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 632c311b18015d194151489bb0773a28eed9c2e1 Mon Sep 17 00:00:00 2001
From: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
Date: Thu, 27 Oct 2022 19:06:52 -0700
Subject: [PATCH 2/2] fix: check for TINYXML2_EXPORT on non windows

---
tinyxml2.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tinyxml2.h b/tinyxml2.h
index cfb1053..a56251c 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -72,7 +72,8 @@ distribution.
# else
# define TINYXML2_LIB
# endif
-#elif __GNUC__ >= 4
+#endif
+#if defined(TINYXML2_EXPORT) && __GNUC__ >= 4
# define TINYXML2_LIB __attribute__((visibility("default")))
#else
# define TINYXML2_LIB
--
2.37.3.windows.1

1 change: 1 addition & 0 deletions ports/tinyxml2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
0001-fix-do-not-force-export-the-symbols-when-building-st.patch
0002-fix-check-for-TINYXML2_EXPORT-on-non-windows.patch
)

vcpkg_cmake_configure(
Expand Down
2 changes: 1 addition & 1 deletion versions/t-/tinyxml2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "29c1c3aaa87957356e4c83b54767b80e3dd89fa2",
"git-tree": "fca8e408ee125d30e546ba42bd9caf4955ab7430",
"version-semver": "9.0.0",
"port-version": 2
},
Expand Down

0 comments on commit c50746e

Please sign in to comment.