Commit 93005125 authored by Brad King's avatar Brad King

ENH: Renamed zlib, png, jpeg, tiff, and expat directories in the Utilities...

ENH: Renamed zlib, png, jpeg, tiff, and expat directories in the Utilities directory to vtkzlib, vtkpng, vtkjpeg, vtktiff, and vtkexpat respectively.  Adjusted the include structure so that code includes vtk_zlib.h and automatically gets the version of zlib used by VTK (and similarly for the other libraries).  Along with the recent name mangling changes, this now completely isolates VTK's version of these libraries and avoids conflict with system versions or versions in other toolkits.
parent dd005617
......@@ -37,6 +37,14 @@ MACRO(VTK_THIRD_PARTY_INCLUDE upper lower)
ENDIF(VTK_USE_SYSTEM_${upper})
ENDMACRO(VTK_THIRD_PARTY_INCLUDE)
MACRO(VTK_THIRD_PARTY_INCLUDE2 upper)
IF(VTK_USE_SYSTEM_${upper})
IF(${upper}_INCLUDE_DIR)
SET(VTK_INCLUDE_DIRS_SYSTEM ${VTK_INCLUDE_DIRS_SYSTEM} ${${upper}_INCLUDE_DIR})
ENDIF(${upper}_INCLUDE_DIR)
ENDIF(VTK_USE_SYSTEM_${upper})
ENDMACRO(VTK_THIRD_PARTY_INCLUDE2)
#-----------------------------------------------------------------------------
MACRO(VTK_THIRD_PARTY_SUBDIR upper lower)
IF(NOT VTK_USE_SYSTEM_${upper})
......
......@@ -20,16 +20,12 @@
#include "vtkToolkits.h"
extern "C" {
#ifdef VTK_USE_SYSTEM_JPEG
# include <jpeglib.h>
#else
# include "vtk_jpeg.h"
#endif
#include "vtk_jpeg.h"
#include <setjmp.h>
}
vtkCxxRevisionMacro(vtkJPEGReader, "1.19");
vtkCxxRevisionMacro(vtkJPEGReader, "1.20");
vtkStandardNewMacro(vtkJPEGReader);
......
......@@ -21,15 +21,11 @@
#include "vtkUnsignedCharArray.h"
extern "C" {
#ifdef VTK_USE_SYSTEM_JPEG
# include <jpeglib.h>
#else
# include "vtk_jpeg.h"
#endif
#include "vtk_jpeg.h"
#include <setjmp.h>
}
vtkCxxRevisionMacro(vtkJPEGWriter, "1.25");
vtkCxxRevisionMacro(vtkJPEGWriter, "1.26");
vtkStandardNewMacro(vtkJPEGWriter);
vtkCxxSetObjectMacro(vtkJPEGWriter,Result,vtkUnsignedCharArray);
......
......@@ -17,15 +17,9 @@
#include "vtkImageData.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkToolkits.h" // for VTK_USE_SYSTEM_PNG
#include "vtk_png.h"
#ifdef VTK_USE_SYSTEM_PNG
# include <png.h>
#else
# include "vtk_png.h"
#endif
vtkCxxRevisionMacro(vtkPNGReader, "1.20");
vtkCxxRevisionMacro(vtkPNGReader, "1.21");
vtkStandardNewMacro(vtkPNGReader);
void vtkPNGReader::ExecuteInformation()
......
......@@ -18,15 +18,9 @@
#include "vtkImageData.h"
#include "vtkObjectFactory.h"
#include "vtkUnsignedCharArray.h"
#include "vtkToolkits.h" // for VTK_USE_SYSTEM_PNG
#include "vtk_png.h"
#ifdef VTK_USE_SYSTEM_PNG
# include <png.h>
#else
# include "vtk_png.h"
#endif
vtkCxxRevisionMacro(vtkPNGWriter, "1.26");
vtkCxxRevisionMacro(vtkPNGWriter, "1.27");
vtkStandardNewMacro(vtkPNGWriter);
vtkCxxSetObjectMacro(vtkPNGWriter,Result,vtkUnsignedCharArray);
......
......@@ -21,16 +21,12 @@
#include <sys/stat.h>
extern "C" {
#ifdef VTK_USE_SYSTEM_TIFF
# include <tiffio.h>
#else
# include "vtk_tiff.h"
#endif
#include "vtk_tiff.h"
}
//-------------------------------------------------------------------------
vtkStandardNewMacro(vtkTIFFReader);
vtkCxxRevisionMacro(vtkTIFFReader, "1.41");
vtkCxxRevisionMacro(vtkTIFFReader, "1.42");
class vtkTIFFReaderInternal
{
......
......@@ -18,15 +18,9 @@
#include "vtkImageData.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkToolkits.h"
#include "vtk_tiff.h"
#ifdef VTK_USE_SYSTEM_TIFF
# include <tiffio.h>
#else
# include "vtk_tiff.h"
#endif
vtkCxxRevisionMacro(vtkTIFFWriter, "1.34");
vtkCxxRevisionMacro(vtkTIFFWriter, "1.35");
vtkStandardNewMacro(vtkTIFFWriter);
//----------------------------------------------------------------------------
......
......@@ -29,17 +29,11 @@
#include "vtkXMLParser.h"
#include "vtkObjectFactory.h"
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_EXPAT
# include <expat.h>
#else
# include "vtk_expat.h"
#endif
#include "vtk_expat.h"
#include <ctype.h>
#include <sys/stat.h>
vtkCxxRevisionMacro(vtkXMLParser, "1.23");
vtkCxxRevisionMacro(vtkXMLParser, "1.24");
vtkStandardNewMacro(vtkXMLParser);
//----------------------------------------------------------------------------
......
......@@ -14,15 +14,9 @@
=========================================================================*/
#include "vtkZLibDataCompressor.h"
#include "vtkObjectFactory.h"
#include "vtkToolkits.h" // for VTK_USE_SYSTEM_ZLIB
#include "vtk_zlib.h"
#ifdef VTK_USE_SYSTEM_ZLIB
# include <zlib.h>
#else
# include "vtk_zlib.h"
#endif
vtkCxxRevisionMacro(vtkZLibDataCompressor, "1.5");
vtkCxxRevisionMacro(vtkZLibDataCompressor, "1.6");
vtkStandardNewMacro(vtkZLibDataCompressor);
//----------------------------------------------------------------------------
......
# Build third-party utilities.
VTK_THIRD_PARTY_SUBDIR(ZLIB zlib)
VTK_THIRD_PARTY_SUBDIR(JPEG jpeg)
VTK_THIRD_PARTY_SUBDIR(PNG png)
VTK_THIRD_PARTY_SUBDIR(TIFF tiff)
VTK_THIRD_PARTY_SUBDIR(EXPAT expat)
VTK_THIRD_PARTY_SUBDIR(ZLIB vtkzlib)
VTK_THIRD_PARTY_SUBDIR(JPEG vtkjpeg)
VTK_THIRD_PARTY_SUBDIR(PNG vtkpng)
VTK_THIRD_PARTY_SUBDIR(TIFF vtktiff)
VTK_THIRD_PARTY_SUBDIR(EXPAT vtkexpat)
VTK_THIRD_PARTY_SUBDIR(DICOMParser DICOMParser)
SUBDIRS(Doxygen)
......@@ -19,3 +19,4 @@ ENDIF(VTK_USE_RENDERING)
# This is the installed VTKConfig.cmake file configured at the top
# level.
INSTALL_FILES(/lib/vtk .cmake VTKConfig)
INSTALL_FILES(/include/vtk .h vtk_expat vtk_jpeg vtk_png vtk_zlib vtk_tiff)
#ifndef __vtk_expat_h
#define __vtk_expat_h
/* Use double-quoted include to make sure we get the correct expat header. */
#include "expat.h"
#endif
#ifndef __vtk_jpeg_h
#define __vtk_jpeg_h
/* Use double-quoted include to make sure we get the correct jpeg header. */
#include "jpeglib.h"
#endif
#ifndef __vtk_png_h
#define __vtk_png_h
/* Use double-quoted include to make sure we get the correct png header. */
#include "png.h"
#endif
#ifndef __vtk_tiff_h
#define __vtk_tiff_h
/* Use double-quoted include to make sure we get the correct tiff header. */
#include "tiffio.h"
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_expat.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtk_expat_h
#define __vtk_expat_h
/* Use the expat library configured for VTK. */
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_EXPAT
# include <expat.h>
#else
# include <vtkexpat/expat.h>
#endif
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_jpeg.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtk_jpeg_h
#define __vtk_jpeg_h
/* Use the jpeg library configured for VTK. */
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_JPEG
# include <jpeglib.h>
#else
# include <vtkjpeg/jpeglib.h>
#endif
#endif
/* Include the jerror header if VTK_JPEG_INCLUDE_JERROR is defined. */
#if defined(VTK_JPEG_INCLUDE_JERROR) && !defined(VTK_JPEG_JERROR_INCLUDED)
# define VTK_JPEG_JERROR_INCLUDED
# ifdef VTK_USE_SYSTEM_JPEG
# include <jerror.h>
# else
# include <vtkjpeg/jerror.h>
# endif
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_png.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtk_png_h
#define __vtk_png_h
/* Use the png library configured for VTK. */
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_PNG
# include <png.h>
#else
# include <vtkpng/png.h>
#endif
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_tiff.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtk_tiff_h
#define __vtk_tiff_h
/* Use the tiff library configured for VTK. */
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_TIFF
# include <tiffio.h>
#else
# include <vtktiff/tiffio.h>
#endif
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_zlib.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtk_zlib_h
#define __vtk_zlib_h
/* Use the zlib library configured for VTK. */
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_ZLIB
# include <zlib.h>
#else
# include <vtkzlib/zlib.h>
#endif
#endif
......@@ -8,7 +8,6 @@ SET(expat_SRCS
)
INCLUDE_DIRECTORIES(${VTKEXPAT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${VTKEXPAT_BINARY_DIR})
IF(WIN32)
IF(NOT BUILD_SHARED_LIBS)
......@@ -26,4 +25,4 @@ CONFIGURE_FILE(${VTKEXPAT_SOURCE_DIR}/.NoDartCoverage
ADD_LIBRARY(vtkexpat ${expat_SRCS})
INSTALL_TARGETS(/lib/vtk vtkexpat)
INSTALL_FILES(/include/vtk .h expat expatDllConfig)
INSTALL_FILES(/include/vtk/vtkexpat .h expat expatDllConfig vtk_expat_mangle)
......@@ -9,7 +9,7 @@ See the file COPYING for copying permission.
#include <stdlib.h>
#include "expatDllConfig.h"
#include <vtkexpat/expatDllConfig.h>
#if defined(_WIN32) && !defined(VTK_EXPAT_STATIC)
# if defined(vtkexpat_EXPORTS)
......
......@@ -3,7 +3,7 @@ Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#include "expatConfig.h"
#include <vtkexpat/expatConfig.h>
#include "expat.h"
#include <stddef.h>
......
......@@ -11,7 +11,7 @@ const char* vtk_expat_GetXMLRole_RCSId()
return RCSId;
}
#include "expatConfig.h"
#include <vtkexpat/expatConfig.h>
#include "xmlrole.h"
#include "ascii.h"
......
......@@ -3,7 +3,7 @@ Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#include "expatConfig.h"
#include <vtkexpat/expatConfig.h>
#include "xmltok.h"
#include "nametab.h"
......
......@@ -3,7 +3,6 @@ PROJECT(VTKJPEG)
INCLUDE_REGULAR_EXPRESSION("^(jchuff|jconfig|jdct|jdhuff|jerror|jinclude|jmemsys|jmorecfg|jpegint|jpeglib|jversion|jpeg|vtk).*$")
INCLUDE_DIRECTORIES(${VTKJPEG_SOURCE_DIR})
INCLUDE_DIRECTORIES(${VTKJPEG_BINARY_DIR})
# memmgr back ends: compile only one of these into a working library
# (For now, let's use the mode that requires the image fit into memory.
......@@ -49,4 +48,5 @@ CONFIGURE_FILE(${VTKJPEG_SOURCE_DIR}/jpegDllConfig.h.in
ADD_LIBRARY(vtkjpeg ${systemdependent_SRCS} ${common_SRCS} ${compression_SRCS} ${decompression_SRCS})
INSTALL_TARGETS(/lib/vtk vtkjpeg)
INSTALL_FILES(/include/vtk/vtkjpeg .h
jpegDllConfig jpeglib vtk_jpeg_mangle jconfig jmorecfg jerror)
......@@ -10,7 +10,7 @@
* optimizations. Most users will not need to touch this file.
*/
#include "jpegDllConfig.h"
#include <vtkjpeg/jpegDllConfig.h>
/*
* Define BITS_IN_JSAMPLE as either
......