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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
|
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: Muellni <mmuellen@gmx.de>
Date: Tue, 25 Oct 2011 23:32:42 +0200
Subject: [PATCH] add file TryRunResults.cmake
diff --git a/TryRunResults.cmake b/TryRunResults.cmake
new file mode 100644
index 1111111..2222222
--- /dev/null
+++ b/TryRunResults.cmake
@@ -0,0 +1,30 @@
+SET( VTK_TYPE_CHAR_IS_SIGNED
+ "1"
+ CACHE STRING "Result from TRY_RUN" FORCE)
+SET( VTK_ANSI_STREAM_EOF_RESULT
+ "1"
+ CACHE STRING "Result from TRY_RUN" FORCE)
+SET( KWSYS_CHAR_IS_SIGNED
+ "0"
+ CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT
+ ""
+ CACHE STRING "Output from TRY_RUN" FORCE)
+
+SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT
+ ""
+ CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT
+ ""
+ CACHE STRING "Output from TRY_RUN" FORCE)
+
+SET( KWSYS_LFS_WORKS
+ "0"
+ CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT
+ ""
+ CACHE STRING "Output from TRY_RUN" FORCE)
+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Muellni <mmuellen@gmx.de>
Date: Tue, 25 Oct 2011 23:32:42 +0200
Subject: [PATCH] PATH_SUFFIXES freetype2
This patch has been taken from:
http://www.vtk.org/Bug/view.php?id=12688
diff --git a/CMake/FindFREETYPE.cmake b/CMake/FindFREETYPE.cmake
index 1111111..2222222 100644
--- a/CMake/FindFREETYPE.cmake
+++ b/CMake/FindFREETYPE.cmake
@@ -15,6 +15,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h)
FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h
/usr/include/freetype2
/usr/local/include/freetype2
+ PATH_SUFFIXES freetype2
)
FIND_LIBRARY(FREETYPE_LIBRARY freetype)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Muellni <mmuellen@gmx.de>
Date: Mon, 31 Oct 2011 09:04:03 +0100
Subject: [PATCH] building without wine
merged compile tools patches into one patch file and added
a CompileTools target for compiling only the compile tools
during the native build
This patch has been taken from:
http://www.vtk.org/Bug/view.php?id=12686
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,10 @@ IF(NOT EXPORT_EXECUTABLES_FILE)
FILE(WRITE "${EXPORT_EXECUTABLES_FILE}" "#generated by VTK, do not edit\n")
ENDIF(NOT EXPORT_EXECUTABLES_FILE)
+# Add a target for building only the compile tools
+ADD_CUSTOM_TARGET(CompileTools)
+SET(COMPILE_TOOLS_TARGET "CompileTools")
+
GET_PROPERTY(VTK_TARGET_SUPPORTS_SHARED_LIBS
GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
diff --git a/Utilities/kwsys/CMakeLists.txt b/Utilities/kwsys/CMakeLists.txt
index 1111111..2222222 100644
--- a/Utilities/kwsys/CMakeLists.txt
+++ b/Utilities/kwsys/CMakeLists.txt
@@ -937,13 +937,20 @@ ENDIF(KWSYS_USE_String)
# file and build it into the library. Win9x platforms reproduce the
# executable into a temporary directory when it is needed.
IF(KWSYS_USE_Process)
- IF(NOT UNIX)
+ IF(NOT CMAKE_CROSSCOMPILING)
# Build the forwarding executable itself and a program that will
# encode it into a C file.
- ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c)
- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ EXPORT(TARGETS ${KWSYS_NAMESPACE}EncodeExecutable FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
+ IF(COMPILE_TOOLS_TARGET)
+ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} ${KWSYS_NAMESPACE}EncodeExecutable)
+ ENDIF(COMPILE_TOOLS_TARGET)
+ ENDIF(NOT CMAKE_CROSSCOMPILING)
+
+ IF(NOT UNIX)
+ ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
+ KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
# Construct the location of the executable to be encoded.
SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -957,24 +964,23 @@ IF(KWSYS_USE_Process)
ENDIF(CMAKE_BUILD_TOOL MATCHES "make")
# Take advantage of a better custom command syntax if possible.
- SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- COMMAND ${CMD}
+ COMMAND ${KWSYS_NAMESPACE}EncodeExecutable
ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
${KWSYS_NAMESPACE} ProcessFwd9x
- DEPENDS ${CMD} ${FWD})
+ DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD})
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
ADD_CUSTOM_COMMAND(
TARGET ${KWSYS_NAMESPACE}
SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c
- COMMAND ${CMD}
+ COMMAND ${KWSYS_NAMESPACE}EncodeExecutable
ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
${KWSYS_NAMESPACE} ProcessFwd9x
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- DEPENDS ${CMD} ${FWD})
+ DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD})
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
# Make sure build occurs in proper order.
diff --git a/Utilities/vtkhdf5/src/CMakeLists.txt b/Utilities/vtkhdf5/src/CMakeLists.txt
index 1111111..2222222 100644
--- a/Utilities/vtkhdf5/src/CMakeLists.txt
+++ b/Utilities/vtkhdf5/src/CMakeLists.txt
@@ -572,34 +572,40 @@ INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR})
# Setup the H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT})
-IF (XCODE)
- SET (CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5detect")
-ENDIF (XCODE)
-ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
-IF (WIN32)
- TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
-ENDIF (WIN32)
+IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
+ IF (WIN32)
+ TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
+ ENDIF (WIN32)
+
+ EXPORT(TARGETS H5detect FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
+ IF(COMPILE_TOOLS_TARGET)
+ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5detect)
+ ENDIF(COMPILE_TOOLS_TARGET)
+ENDIF(NOT CMAKE_CROSSCOMPILING)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
- COMMAND ${CMD}
+ COMMAND H5detect
ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c
DEPENDS H5detect
)
-SET (CMDL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5make_libsettings${EXE_EXT})
-IF (XCODE)
- SET (CMDL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5make_libsettings")
-ENDIF (XCODE)
-ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
-IF (WIN32)
- TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
-ENDIF (WIN32)
+IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
+ IF (WIN32)
+ TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
+ ENDIF (WIN32)
+
+ EXPORT(TARGETS H5make_libsettings FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
+ IF(COMPILE_TOOLS_TARGET)
+ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5make_libsettings)
+ ENDIF(COMPILE_TOOLS_TARGET)
+ENDIF(NOT CMAKE_CROSSCOMPILING)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
- COMMAND ${CMDL}
+ COMMAND H5make_libsettings
ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
DEPENDS H5make_libsettings
)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 22 Nov 2011 22:18:31 +1100
Subject: [PATCH] disable gui components in native build
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 1111111..2222222 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -68,10 +68,8 @@ IF(VTK_USE_PARALLEL)
VTK_THIRD_PARTY_SUBDIR(Cosmo Cosmo)
ENDIF(VTK_USE_PARALLEL)
-IF(VTK_USE_RENDERING)
- ADD_SUBDIRECTORY(ftgl)
- ADD_SUBDIRECTORY(ParseOGLExt)
-ENDIF(VTK_USE_RENDERING)
+ADD_SUBDIRECTORY(ftgl)
+ADD_SUBDIRECTORY(ParseOGLExt)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL(FILES
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Wed, 23 Nov 2011 20:31:10 +1100
Subject: [PATCH] fix third party module search path
This patch has been taken from:
http://www.vtk.org/Bug/view.php?id=12746
diff --git a/CMake/vtkThirdParty.cmake b/CMake/vtkThirdParty.cmake
index 1111111..2222222 100644
--- a/CMake/vtkThirdParty.cmake
+++ b/CMake/vtkThirdParty.cmake
@@ -3,11 +3,11 @@ MACRO(VTK_THIRD_PARTY_OPTION upper lower)
OPTION(VTK_USE_SYSTEM_${upper} "Use the system's ${lower} library." OFF)
MARK_AS_ADVANCED(VTK_USE_SYSTEM_${upper})
IF(VTK_USE_SYSTEM_${upper})
- IF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
- INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake)
- ELSE(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
+ IF(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake)
INCLUDE(${VTK_CMAKE_DIR}/Find${upper}.cmake)
- ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake)
+ ELSE(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake)
+ INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake)
+ ENDIF(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake)
MARK_AS_ADVANCED(${upper}_INCLUDE_DIR ${upper}_LIBRARY)
IF(${upper}_FOUND)
SET(VTK_${upper}_LIBRARIES ${${upper}_LIBRARIES})
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Mon, 28 Nov 2011 00:24:59 +1100
Subject: [PATCH] portability fix for Debian kFreeBSD
diff --git a/Utilities/vtkhdf5/src/H5private.h b/Utilities/vtkhdf5/src/H5private.h
index 1111111..2222222 100644
--- a/Utilities/vtkhdf5/src/H5private.h
+++ b/Utilities/vtkhdf5/src/H5private.h
@@ -141,7 +141,7 @@
# include <sys/sysinfo.h>
#endif
/* Prevent compile errors with GCC 4.3 on Solaris 2.10 */
-#if defined (__SVR4) && defined (__sun)
+#if defined (__SVR4) && defined (__sun) || defined(__FreeBSD_kernel__) && defined(__GLIBC__)
/* In file included from /usr/include/sys/klwp.h:19,
* from /usr/include/sys/thread.h:13,
* from /usr/include/sys/proc.h:20,
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: David Partyka <david.partyka@kitware.com>
Date: Wed, 21 Sep 2011 13:19:30 -0400
Subject: [PATCH] Merge branch '11742_mingw64_compile_fixes' into release
Style fixes were removed by Boris Nagaev <bnagaev@gmail.com>.
diff --git a/Common/vtkWin32Header.h b/Common/vtkWin32Header.h
index 1111111..2222222 100644
--- a/Common/vtkWin32Header.h
+++ b/Common/vtkWin32Header.h
@@ -102,9 +102,15 @@ Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it;
# define vtkGetWindowLong GetWindowLong
# define vtkSetWindowLong SetWindowLong
# define vtkLONG LONG
+# ifdef _WIN64
+# define vtkGWL_WNDPROC GWLP_WNDPROC
+# define vtkGWL_HINSTANCE GWLP_HINSTANCE
+# define vtkGWL_USERDATA GWLP_USERDATA
+# else
# define vtkGWL_WNDPROC GWL_WNDPROC
# define vtkGWL_HINSTANCE GWL_HINSTANCE
# define vtkGWL_USERDATA GWL_USERDATA
+# endif
#endif //
#endif
diff --git a/Hybrid/vtkVideoSource.cxx b/Hybrid/vtkVideoSource.cxx
index 1111111..2222222 100644
--- a/Hybrid/vtkVideoSource.cxx
+++ b/Hybrid/vtkVideoSource.cxx
@@ -432,7 +432,7 @@ void vtkVideoSource::InternalGrab()
ptr = reinterpret_cast<vtkUnsignedCharArray *>(this->FrameBuffer[index])->GetPointer(0);
// Somebody should check this:
- lptr = (int *)(((((long)ptr) + 3)/4)*4);
+ lptr = (int *)(((((intptr_t)ptr) + 3)/4)*4);
i = totalSize/4;
while (--i >= 0)
diff --git a/Rendering/vtkFreeTypeTools.cxx b/Rendering/vtkFreeTypeTools.cxx
index 1111111..2222222 100644
--- a/Rendering/vtkFreeTypeTools.cxx
+++ b/Rendering/vtkFreeTypeTools.cxx
@@ -222,7 +222,7 @@ vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id,
// Map the ID to a text property
vtkSmartPointer<vtkTextProperty> tprop =
vtkSmartPointer<vtkTextProperty>::New();
- self->MapIdToTextProperty(reinterpret_cast<unsigned long>(face_id), tprop);
+ self->MapIdToTextProperty(reinterpret_cast<intptr_t>(face_id), tprop);
// Fonts, organized by [Family][Bold][Italic]
static EmbeddedFontStruct EmbeddedFonts[3][2][2] =
diff --git a/Rendering/vtkFreeTypeUtilities.cxx b/Rendering/vtkFreeTypeUtilities.cxx
index 1111111..2222222 100644
--- a/Rendering/vtkFreeTypeUtilities.cxx
+++ b/Rendering/vtkFreeTypeUtilities.cxx
@@ -337,7 +337,7 @@ vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id,
// Map the ID to a text property
vtkTextProperty *tprop = vtkTextProperty::New();
- self->MapIdToTextProperty(reinterpret_cast<unsigned long>(face_id), tprop);
+ self->MapIdToTextProperty(reinterpret_cast<intptr_t>(face_id), tprop);
// Fonts, organized by [Family][Bold][Italic]
diff --git a/Rendering/vtkWin32OpenGLRenderWindow.cxx b/Rendering/vtkWin32OpenGLRenderWindow.cxx
index 1111111..2222222 100644
--- a/Rendering/vtkWin32OpenGLRenderWindow.cxx
+++ b/Rendering/vtkWin32OpenGLRenderWindow.cxx
@@ -842,7 +842,7 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow()
}
//UpdateWindow(this->WindowId);
this->OwnWindow = 1;
- vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(vtkLONG)this);
+ vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(intptr_t)this);
}
if (!this->DeviceContext)
{
diff --git a/Rendering/vtkWin32RenderWindowInteractor.cxx b/Rendering/vtkWin32RenderWindowInteractor.cxx
index 1111111..2222222 100644
--- a/Rendering/vtkWin32RenderWindowInteractor.cxx
+++ b/Rendering/vtkWin32RenderWindowInteractor.cxx
@@ -17,10 +17,12 @@
#include <string.h>
#include <math.h>
-#define _WIN32_WINNT 0x0400 // for trackmouseevent support requires Win95 with IE 3.0 or greater.
-
#include "vtkWin32OpenGLRenderWindow.h"
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0400 // for trackmouseevent support requires Win95 with IE 3.0 or greater.
+#endif
+
// Mouse wheel support
// In an ideal world we would just have to include <zmouse.h>, but it is not
// always available with all compilers/headers
@@ -91,11 +93,11 @@ vtkWin32RenderWindowInteractor::~vtkWin32RenderWindowInteractor()
// well send a USER message to the other
// event handler so that it can properly
// call this event handler if required
- CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc);
+ CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(intptr_t)this->OldProc);
}
else
{
- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)this->OldProc);
+ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)this->OldProc);
}
this->Enabled = 0;
}
@@ -182,13 +184,13 @@ void vtkWin32RenderWindowInteractor::Enable()
// well send a USER message to the other
// event handler so that it can properly
// call this event handler if required
- CallWindowProc(this->OldProc,this->WindowId,WM_USER+12,24,(LONG)vtkHandleMessage);
+ CallWindowProc(this->OldProc,this->WindowId,WM_USER+12,24,(intptr_t)vtkHandleMessage);
}
else
{
- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)vtkHandleMessage);
+ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)vtkHandleMessage);
}
#ifdef VTK_USE_TDX
if(this->UseTDx)
{
@@ -232,11 +234,11 @@ void vtkWin32RenderWindowInteractor::Disable()
// well send a USER message to the other
// event handler so that it can properly
// call this event handler if required
- CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc);
+ CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(intptr_t)this->OldProc);
}
else
{
- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)this->OldProc);
+ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)this->OldProc);
}
#ifdef VTK_USE_TDX
if(this->Device->GetInitialized())
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sun, 23 Jun 2013 04:50:32 +1000
Subject: [PATCH] enable mingw-w64 build
This patch has been taken from:
http://vtk.org/Bug/print_bug_page.php?bug_id=11742
diff --git a/Hybrid/vtkWin32VideoSource.cxx b/Hybrid/vtkWin32VideoSource.cxx
index 1111111..2222222 100644
--- a/Hybrid/vtkWin32VideoSource.cxx
+++ b/Hybrid/vtkWin32VideoSource.cxx
@@ -274,7 +274,7 @@ void vtkWin32VideoSource::Initialize()
}
// set the user data to 'this'
- vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(vtkLONG)this);
+ vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(intptr_t)this);
// Create the capture window
this->Internal->CapWnd = capCreateCaptureWindow("Capture",
@@ -339,7 +339,7 @@ void vtkWin32VideoSource::Initialize()
}
// set user data for callbacks
- if (!capSetUserData(this->Internal->CapWnd,(long)this))
+ if (!capSetUserData(this->Internal->CapWnd,(intptr_t)this))
{
vtkErrorMacro(<< "Initialize: couldn't set user data for callback"\
<< " (" << GetLastError() << ")");
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sat, 19 Dec 2015 02:36:12 +0300
Subject: [PATCH] cmake: use STREQUAL, not MATCHES to compare paths
See https://github.com/mxe/mxe/issues/1087
diff --git a/Utilities/MaterialLibrary/CMakeLists.txt b/Utilities/MaterialLibrary/CMakeLists.txt
index 1111111..2222222 100644
--- a/Utilities/MaterialLibrary/CMakeLists.txt
+++ b/Utilities/MaterialLibrary/CMakeLists.txt
@@ -91,13 +91,13 @@ ENDMACRO(COPY_FILES_TO_DIR)
# Shaders/Materials provided in Utilities/MaterialLibrary/Repository
# are copied over to the binary dir.
-IF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+IF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
# Ensure that the Source and Build dir are not same.
# In that case we don't need to copy anything.
COPY_FILES_TO_DIR(${MaterialLibrary_SOURCE_DIR}/Repository
${VTK_DEFAULT_SHADERS_DIR})
-ENDIF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+ENDIF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
# Build the ShaderCodes Library.
SET (CgCodes
diff --git a/Utilities/vtkTclTest2Py/CMakeLists.txt b/Utilities/vtkTclTest2Py/CMakeLists.txt
index 1111111..2222222 100644
--- a/Utilities/vtkTclTest2Py/CMakeLists.txt
+++ b/Utilities/vtkTclTest2Py/CMakeLists.txt
@@ -40,9 +40,9 @@ IF(PYTHON_EXECUTABLE AND VTK_WRAP_PYTHON)
SET(VTK_PYTHON_SOURCE_FILES ${VTK_PYTHON_SOURCE_FILES} ${src})
ENDFOREACH(file)
- IF ("${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+ IF ("${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
#MESSAGE("In source build -- no need to copy Python files.")
- ELSE ("${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+ ELSE ("${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
FOREACH(file ${VTK_PYTHON_FILES})
SET(src "${VTK_SOURCE_DIR}/Utilities/vtkTclTest2Py/${file}.py")
SET(tgt "${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py/${file}.py")
@@ -52,7 +52,7 @@ IF(PYTHON_EXECUTABLE AND VTK_WRAP_PYTHON)
OUTPUT ${tgt}
COMMENT "source copy")
ENDFOREACH(file)
- ENDIF ("${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+ ENDIF ("${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
# Byte compile the Python files.
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/compile_all_vtk.py.in
diff --git a/Wrapping/Python/CMakeLists.txt b/Wrapping/Python/CMakeLists.txt
index 1111111..2222222 100644
--- a/Wrapping/Python/CMakeLists.txt
+++ b/Wrapping/Python/CMakeLists.txt
@@ -468,7 +468,7 @@ IF(PYTHON_EXECUTABLE)
SET(VTK_PYTHON_SOURCE_FILES ${VTK_PYTHON_SOURCE_FILES} ${src})
ENDFOREACH(file)
- IF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+ IF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
FOREACH(file ${VTK_PYTHON_FILES})
SET(src "${VTK_SOURCE_DIR}/Wrapping/Python/${file}.py")
SET(tgt "${VTK_BINARY_DIR}/Wrapping/Python/${file}.py")
@@ -477,7 +477,7 @@ IF(PYTHON_EXECUTABLE)
OUTPUT ${tgt}
COMMENT "source copy")
ENDFOREACH(file)
- ENDIF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$")
+ ENDIF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}")
# handle the different configuration types (each will have identical files)
SET(VTK_PYTHON_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES})
|