summaryrefslogtreecommitdiffstats
path: root/src/vtk-1-fixes.patch
blob: 1e13226f9754918e0797a2315311f374963c6031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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: Sat, 22 Jun 2013 18:44:18 +1000
Subject: [PATCH] fix libharu shared linking


--- a/IO/Export/CMakeLists.txt	2017-05-19 15:20:47.000000000 +0200
+++ b/IO/Export/CMakeLists.txt	2017-06-05 11:13:51.646391244 +0200
@@ -33,6 +33,16 @@
   ABSTRACT
   )
 
+if(VTK_BUILD_SHARED_LIBS)
+  set_source_files_properties(
+      vtkPDFContextDevice2D.cxx
+      vtkPDFExporter.cxx
+    PROPERTIES
+    COMPILE_DEFINITIONS
+      HPDF_DLL
+    )
+endif()
+
 vtk_module_library(vtkIOExport ${Module_SRCS})
 include(vtkOpenGL)
 vtk_opengl_link(vtkIOExport)
--- a/CMake/FindLibHaru.cmake	2017-05-19 15:20:47.000000000 +0200
+++ b/VTK-8.0.0.rc1/CMake/FindLibHaru.cmake	2017-06-05 12:56:24.120790922 +0200
@@ -19,7 +19,7 @@
 
 find_path(LIBHARU_INCLUDE_DIR hpdf.h)
 
-find_library(LIBHARU_LIBRARY NAMES hpdf)
+find_library(LIBHARU_LIBRARY NAMES hpdf hpdfs)
 
 # handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if
 # all listed variables are TRUE
--- a/Rendering/OpenGL2/CMakeLists.txt	2017-05-19 15:20:47.000000000 +0200
+++ b/Rendering/OpenGL2/CMakeLists.txt	2017-06-06 01:11:16.512084625 +0200
@@ -122,6 +122,11 @@
   vtkTransformFeedback
   WRAP_EXCLUDE)
 
+if(NOT VTK_BUILD_SHARED_LIBS)
+  set_source_files_properties(${Module_SRCS}
+    PROPERTIES COMPILE_DEFINITIONS GLEW_STATIC)
+endif()
+
 set_source_files_properties(
   ${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx
   vtkOpenGLGL2PSHelper
   
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -251,9 +251,9 @@ endif()
 # Full functional CMAKE_CROSSCOMPILING_EMULATOR support for custom_command and
 # custom_target is available in CMake 3.8.0
 # It was first added in CMake 3.6.0 and later fixed in CMake 3.8.0 (commit e7480d67, CMake issue #16288)
-set(_crosscompiling_emulator_support_custom_target 1)
-if(CMAKE_VERSION VERSION_LESS 3.8.0)
-  set(_crosscompiling_emulator_support_custom_target 0)
+set(_crosscompiling_emulator_support_custom_target 0)
+if(DEFINED CMAKE_CROSSCOMPILING_EMULATOR AND NOT CMAKE_VERSION VERSION_LESS 3.8.0)
+  set(_crosscompiling_emulator_support_custom_target 1)
 endif()
 # Maintain backward compatibility with user setting COMPILE_TOOLS_IMPORTED
 if(DEFINED COMPILE_TOOLS_IMPORTED AND NOT DEFINED VTK_COMPILE_TOOLS_IMPORTED)