[vtkusers] System Zlib -> metaio doesn't seem to work

Steve M. Robbins steve at sumost.ca
Thu Aug 2 23:56:15 EDT 2007


On Thu, Aug 02, 2007 at 01:58:11PM -0400, Sean McBride wrote:
> On 8/2/07 6:40 PM, Atwood, Robert C said:
> 
> >I only find one instance where vtk_zlib_mangle.h is included,  in
> >zconf.h , removing it does allow compilation of the library and my
> >application  with system zlib
> 
> Great!
> 
> I have created a bug summarising what we have discovered:
> <http://www.vtk.org/Bug/bug.php?op=show&bugid=5444>
> 
> I suspect it would be real easy to fix... anyone?

It looks to me like the root cause is that Utilities/vtkmetaio is
incorrectly using the vtk-mangled zlib include directory.  The
attached patch fixes things for me.  (I tested with both
VTK_USE_SYSTEM_ZLIB=ON and VTK_USE_SYSTEM_ZLIB=OFF)

BTW: I tried to send the patch and note to the bugtracker, but it
didn't let me.



Index: Utilities/vtkmetaio/CMakeLists.txt
===================================================================
RCS file: /cvsroot/VTK/VTK/Utilities/vtkmetaio/CMakeLists.txt,v
retrieving revision 1.9
diff -u -b -B -r1.9 CMakeLists.txt
--- Utilities/vtkmetaio/CMakeLists.txt	29 May 2007 12:13:13 -0000	1.9
+++ Utilities/vtkmetaio/CMakeLists.txt	3 Aug 2007 03:46:47 -0000
@@ -54,7 +54,6 @@
   IF(BUILD_SHARED_LIBS)
     ADD_DEFINITIONS(-Dvtkmetaio_BUILD_SHARED_LIBS)
   ENDIF(BUILD_SHARED_LIBS)
-  INCLUDE_DIRECTORIES(${VTKZLIB_SOURCE_DIR})
   TARGET_LINK_LIBRARIES(${METAIO_NAMESPACE} ${VTK_ZLIB_LIBRARIES}
                                             ${KWSYS_NAMESPACE})
   IF(VTK_LIBRARY_PROPERTIES)
@@ -63,7 +62,6 @@
   ENDIF(VTK_LIBRARY_PROPERTIES)
 ELSE(METAIO_FOR_VTK)
   IF(METAIO_FOR_ITK)
-    INCLUDE_DIRECTORIES(${ITK_ZLIB_SOURCE_DIR})
     TARGET_LINK_LIBRARIES(${METAIO_NAMESPACE} ${ITK_ZLIB_LIBRARIES} 
                                               ${KWSYS_NAMESPACE})
     IF(ITK_LIBRARY_PROPERTIES)
@@ -71,7 +69,6 @@
                             PROPERTIES ${ITK_LIBRARY_PROPERTIES})
     ENDIF(ITK_LIBRARY_PROPERTIES)
   ELSE(METAIO_FOR_ITK)
-    INCLUDE_DIRECTORIES(${ZLIB_SOURCE_DIR})
     TARGET_LINK_LIBRARIES(${METAIO_NAMESPACE} ${ZLIB_LIBRARIES}
                                               ${KWSYS_NAMESPACE})
   ENDIF(METAIO_FOR_ITK)



-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070802/d6fb01df/attachment.pgp>


More information about the vtkusers mailing list