You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/vtk-1-fixes.patch

120 lines
4.3 KiB

This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20M=C3=BCllenhaupt?= <mm+mxe.cc@netlair.de>
Date: Wed, 20 Feb 2019 23:04:57 +1100
Subject: [PATCH 1/4] fix glew static linking
diff --git a/Rendering/OpenGL2/CMakeLists.txt b/Rendering/OpenGL2/CMakeLists.txt
index 1111111..2222222 100644
--- a/Rendering/OpenGL2/CMakeLists.txt
+++ b/Rendering/OpenGL2/CMakeLists.txt
@@ -345,3 +345,11 @@ if (WIN32 AND ( NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATO
)
target_link_libraries(vtkTestOpenGLVersion opengl32)
endif()
+
+#fix GLEW static linking
+if(NOT VTK_BUILD_SHARED_LIBS)
+ set_source_files_properties(${Module_SRCS}
+ PROPERTIES
+ COMPILE_DEFINITIONS GLEW_STATIC
+ )
+endif()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: jan <jan@linux-a9ex>
Date: Mon, 18 May 2020 22:38:26 +0200
Subject: [PATCH 2/4] ODR fix: use unique names for dummy symbols.
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
index 1111111..2222222 100644
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
@@ -614,5 +614,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI
* Prevent warning in some versions of ranlib(1) because the object
* file has no symbols.
*/
-const char exodus_unused_symbol_dummy_1;
+const char exodus_unused_symbol_dummy_ex_create_par;
#endif
diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
index 1111111..2222222 100644
--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
@@ -474,5 +474,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float
* Prevent warning in some versions of ranlib(1) because the object
* file has no symbols.
*/
-const char exodus_unused_symbol_dummy_1;
+const char exodus_unused_symbol_dummy_ex_open_par;
#endif
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: jan <jan@linux-a9ex>
Date: Mon, 18 May 2020 22:38:07 +0200
Subject: [PATCH 3/4] Added missing export to __declspec(dllexport).
diff --git a/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h b/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h
index 1111111..2222222 100644
--- a/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h
+++ b/ThirdParty/libxml2/vtklibxml2/include/libxml/xmlexports.h
@@ -111,7 +111,7 @@
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
- #define XMLPUBVAR __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Wed, 27 May 2020 18:23:33 +0200
Subject: [PATCH 4/4] add missing include for QPainterPath
Qt 5.15 compatibility
diff --git a/GUISupport/Qt/QVTKPaintEngine.h b/GUISupport/Qt/QVTKPaintEngine.h
index 1111111..2222222 100644
--- a/GUISupport/Qt/QVTKPaintEngine.h
+++ b/GUISupport/Qt/QVTKPaintEngine.h
@@ -14,6 +14,7 @@
#include "QVTKWin32Header.h"
#include <QPaintEngine>
+#include <QPainterPath>
#include <vtkSetGet.h>
class QVTKWidget;
class QVTKPaintEngineInternal;
diff --git a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
index 1111111..2222222 100644
--- a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
+++ b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
@@ -41,6 +41,7 @@
#include <QImage>
#include <QMap>
#include <QPainter>
+#include <QPainterPath>
#include <QPair>
#include <QPixmap>
#include <QTextDocument>
diff --git a/Rendering/Qt/vtkQtStringToImage.cxx b/Rendering/Qt/vtkQtStringToImage.cxx
index 1111111..2222222 100644
--- a/Rendering/Qt/vtkQtStringToImage.cxx
+++ b/Rendering/Qt/vtkQtStringToImage.cxx
@@ -31,6 +31,7 @@
#include <QFontMetrics>
#include <QImage>
#include <QPainter>
+#include <QPainterPath>
#include <QPixmap>
#include <QTextDocument>
#include <QTextStream>