[gts] fix build with clang-cl (#26184)

* gts fix dllexport definitions.

* v db

* Revert trailing whitespace addition.

Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
Alexander Neumann 2022-08-06 09:16:14 +02:00 committed by GitHub
parent 778c58db3b
commit 9b22b40c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 4 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/gts.h b/src/gts.h
index 1b76915..ae1d888 100644
--- a/src/gts.h
+++ b/src/gts.h
@@ -38,7 +38,7 @@ extern "C" {
* we prefix variable declarations so they can
* properly get exported in windows dlls.
*/
-#ifdef NATIVE_WIN32
+#if 1
# ifdef GTS_COMPILATION
# define GTS_C_VAR __declspec(dllexport)
# else /* not GTS_COMPILATION */

View File

@ -0,0 +1,13 @@
diff --git a/src/gts.h b/src/gts.h
index 1b7691531..1e87167bc 100644
--- a/src/gts.h
+++ b/src/gts.h
@@ -40,7 +40,7 @@ extern "C" {
*/
#if 1
# ifdef GTS_COMPILATION
-# define GTS_C_VAR __declspec(dllexport)
+# define GTS_C_VAR extern __declspec(dllexport)
# else /* not GTS_COMPILATION */
# define GTS_C_VAR extern __declspec(dllimport)
# endif /* not GTS_COMPILATION */

View File

@ -1,7 +1,7 @@
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(patches fix-dllexport.patch)
else()
set(patches "")
elseif(VCPKG_TARGET_IS_WINDOWS)
set(patches fix-dllexport_2.patch fix_missing_extern.patch)
endif()
vcpkg_from_sourceforge(

View File

@ -1,7 +1,7 @@
{
"name": "gts",
"version": "0.7.6",
"port-version": 6,
"port-version": 7,
"description": "3D surfaces meshed with interconnected triangles",
"homepage": "http://gts.sourceforge.net/",
"supports": "!osx",

View File

@ -2750,7 +2750,7 @@
},
"gts": {
"baseline": "0.7.6",
"port-version": 6
"port-version": 7
},
"guetzli": {
"baseline": "2020-09-14",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1bce412085edcd46e3f358cca2c3bb1cffb25cfa",
"version": "0.7.6",
"port-version": 7
},
{
"git-tree": "fbe5bc5629f2ec46a083b4e861589cae5b559c5f",
"version": "0.7.6",