Commit 6553d742 authored by bonnell's avatar bonnell
Browse files

Fix a few LIBDEP issues on Windows. Added jpeg libs for windows.

Added Find modules for szip and jpeg on windows.
Fix usage of an uninitialized variable.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@13365 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6f5e1619
#*****************************************************************************
#
# Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-400142
# All rights reserved.
#
# This file is part of VisIt. For details, see https://visit.llnl.gov/. The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of the LLNS/LLNL nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
# LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
# Modifications:
#
#****************************************************************************/
# Use the JPEG_DIR hint from the config-site .cmake file
INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake)
IF (WIN32)
SET_UP_THIRD_PARTY(JPEG lib/${VISIT_MSVC_VERSION} include libjpeg)
ENDIF (WIN32)
#*****************************************************************************
#
# Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-400142
# All rights reserved.
#
# This file is part of VisIt. For details, see https://visit.llnl.gov/. The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of the LLNS/LLNL nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
# LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
# Modifications:
#
#****************************************************************************/
# Use the SZIP_DIR hint from the config-site .cmake file
INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake)
IF (WIN32)
SET_UP_THIRD_PARTY(SZIP lib/${VISIT_MSVC_VERSION} include szlibdll)
ENDIF (WIN32)
......@@ -195,6 +195,11 @@
# Cyrus Harrison, Mon Dec 20 10:50:29 PST 2010
# Use FORCE when setting various install paths.
#
# Kathleen Bonnell, Tue Dec 28 17:06:41 MST 2010
# Add VISIT_3RDPARTY_VAR for VISIT_SZIP_DIR and VISIT_JPEG_DIR for Windows,
# and VISIT_H5PART_LIBDEP for all platforms. Call find for szip, zlib and
# jpeg before Finds for any libs that may have dependencies on them.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
......@@ -397,6 +402,13 @@ VISIT_3RDPARTY_VAR(VISIT_MESA_DIR "Path containing the Mesa library's include
VISIT_3RDPARTY_VAR(VISIT_ICET_DIR "Path containing the Ice-T library's include and lib" ICET_DIR)
VISIT_3RDPARTY_VAR(VISIT_TCMALLOC_DIR "Path containing the tcmalloc library's include and lib" TCMALLOC_DIR)
# Libraries some third-parties are dependent upon
IF(WIN32)
VISIT_3RDPARTY_VAR(VISIT_JPEG_DIR "Path containing the jpeg library's include and lib" JPEG_DIR)
VISIT_3RDPARTY_VAR(VISIT_SZIP_DIR "Path containing the szip library's include and lib" SZIP_DIR)
VISIT_3RDPARTY_VAR(VISIT_ZLIB_DIR "Path containing the zlib library's include and lib" ZLIB_DIR)
ENDIF(WIN32)
# Define the options that let us pick I/O library installation locations. When
# the library option is defined then we also define the variable name passed as
# the 3rd argument. That variable is what is used in our various Find routines.
......@@ -422,6 +434,7 @@ VISIT_3RDPARTY_DEP(VISIT_HDF4_LIBDEP "HDF4 library dependencies" HDF4_LIBDEP)
VISIT_3RDPARTY_VAR(VISIT_HDF5_DIR "Path containing the HDF5 library's include and lib" HDF5_DIR)
VISIT_3RDPARTY_DEP(VISIT_HDF5_LIBDEP "HDF5 library dependencies" HDF5_LIBDEP)
VISIT_3RDPARTY_VAR(VISIT_H5PART_DIR "Path containing the H5Part library's include and lib" H5PART_DIR)
VISIT_3RDPARTY_VAR(VISIT_H5PART_LIBDEP "H5Part library dependencies" H5PART_LIBDEP)
VISIT_3RDPARTY_VAR(VISIT_MILI_DIR "Path containing the Mili library's include and lib" MILI_DIR)
VISIT_3RDPARTY_VAR(VISIT_NETCDF_DIR "Path containing the NETCDF library's include and lib" NETCDF_DIR)
VISIT_3RDPARTY_VAR(VISIT_NETCDF_LIBDEP "NETCDF library dependencies" NETCDF_LIBDEP)
......@@ -431,9 +444,6 @@ VISIT_3RDPARTY_VAR(VISIT_VISUS_DIR "Path containing the ViSUS library's incl
VISIT_3RDPARTY_VAR(VISIT_XDMF_DIR "Path containing the Xdmf library's include and lib" XDMF_DIR)
VISIT_3RDPARTY_VAR(VISIT_XDMF_LIBDEP "Xdmf library dependencies" XDMF_LIBDEP)
VISIT_3RDPARTY_VAR(VISIT_MDSPLUS_DIR "Path containing the MDSplus library's include and lib" MDSPLUS_DIR)
IF(WIN32)
VISIT_3RDPARTY_VAR(VISIT_ZLIB_DIR "Path containing the zlib library's include and lib" ZLIB_DIR)
ENDIF(WIN32)
#-----------------------------------------------------------------------------
# Read the version
#-----------------------------------------------------------------------------
......@@ -813,6 +823,24 @@ ENDIF(VISIT_PARALLEL)
# Include TCMALLOC support if we can.
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindTCMALLOC.cmake)
# zlib, szip and jpeg
IF(CMAKE_HOST_UNIX)
SET(ZLIB_LIB z)
SET(DL_LIB dl)
ADD_DEFINITIONS(-D_LARGEFILE64_SOURCE)
ELSE(CMAKE_HOST_UNIX)
IF(WIN32)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindZlib.cmake)
IF(NOT ZLIB_FOUND)
SET(ZLIB_LIB vtkzlib)
ENDIF(NOT ZLIB_FOUND)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindJPEG.cmake)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindSzip.cmake)
ELSE(WIN32)
SET(ZLIB_LIB vtkzlib)
ENDIF(WIN32)
ENDIF(CMAKE_HOST_UNIX)
# Configure HDF5 support. Do it before the other libraries since many can depend on it.
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindHDF5.cmake)
IF(HDF5_FOUND)
......@@ -934,21 +962,6 @@ IF(MDSPLUS_FOUND)
ENDIF(MDSPLUS_FOUND)
IF(CMAKE_HOST_UNIX)
SET(ZLIB_LIB z)
SET(DL_LIB dl)
ADD_DEFINITIONS(-D_LARGEFILE64_SOURCE)
ELSE(CMAKE_HOST_UNIX)
IF(WIN32)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindZlib.cmake)
IF(NOT ZLIB_FOUND)
SET(ZLIB_LIB vtkzlib)
ENDIF(NOT ZLIB_FOUND)
ELSE(WIN32)
SET(ZLIB_LIB vtkzlib)
ENDIF(WIN32)
ENDIF(CMAKE_HOST_UNIX)
IF (WIN32)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindNSIS.cmake)
ENDIF (WIN32)
......
......@@ -952,7 +952,7 @@ AddEnvironment(const int useShortFileName, const int addPluginVars)
putenv(tmp);
if (addPluginVars)
{
sprintf(tmp, "VISITPLUGININSTPRI=%s\LLNL\VisIt", appData);
sprintf(tmp, "VISITPLUGININSTPRI=%s\\LLNL\\VisIt", appData);
putenv(tmp);
}
}
......
......@@ -7,20 +7,12 @@ IF (MSVC_VERSION)
SET(VISIT_MSVC_VERSION "MSVC90")
ELSEIF (NOT MSVC_VERSION LESS 1400)
SET(VISIT_MSVC_VERSION "MSVC80")
ELSEIF (NOT MSVC_VERSION LESS 1310)
SET(VISIT_MSVC_VERSION "MSVC71")
ELSE (NOT MSVC_VERSION LESS 1600)
MESSAGE(SEND_ERROR "${ERRMSG}")
ENDIF (NOT MSVC_VERSION LESS 1600)
ELSE (MSVC_VERSION)
# For some reason, cmake doesnt' set MSVC_VERSION when .Net2003 compiler
# is chosen. Check a different flag.
IF (MSVC71)
SET(VISIT_MSVC_VERSION "MSVC71")
ELSE (MSVC71)
MESSAGE(SEND_ERROR "${ERRMSG}")
ENDIF (MSVC71)
MESSAGE(SEND_ERROR "${ERRMSG}")
ENDIF(MSVC_VERSION)
# this can be left in generic_windows.cmake, but allow user to
......@@ -33,50 +25,151 @@ ENDIF (CMAKE_CL_64)
SET(VISIT_WINDOWS_DIR ${VISIT_SOURCE_DIR}/../windowsbuild)
SET(VISITHOME ${VISIT_WINDOWS_DIR}/ThirdParty)
##############################################################
##
## Required libraries
##
##############################################################
VISIT_OPTION_DEFAULT(VISIT_MESA_DIR ${VISITHOME}/Mesa)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-5.0.0h/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
##
## VTK
##
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR
${VISITHOME}/vtk-5.0.0h/${VISIT_MSVC_VERSION}/lib/vtk-5.0)
##
## QT
##
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/Qt/lib/${VISIT_MSVC_VERSION})
VISIT_OPTION_DEFAULT(QT_DIR ${VISITHOME}/Qt)
SET(QT_QMAKE_EXECUTABLE ${VISIT_QT_BIN}/qmake.exe)
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/Python26/${VISIT_MSVC_VERSION})
##
## PYTHON
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR
${VISITHOME}/Python26/${VISIT_MSVC_VERSION})
##############################################################
##
## Some misc libraries Database readers may depend upon
##
##############################################################
##
## JPEG
##
VISIT_OPTION_DEFAULT(VISIT_JPEG_DIR ${VISITHOME}/jpeg)
##
## SZIP
##
VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip)
##
## ZLIB
##
VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib)
##############################################################
##
## Database reader plugin support libraries
##
## For libraries with LIBDEP settings, order matters.
## Libraries with LIBDEP settings that depend on other
## Library's LIBDEP settings must come after them.
##############################################################
##
## BOXLIB
##
VISIT_OPTION_DEFAULT(VISIT_BOXLIB2D_DIR ${VISITHOME}/BoxLib-2010.10.01)
VISIT_OPTION_DEFAULT(VISIT_BOXLIB3D_DIR ${VISITHOME}/BoxLib-2010.10.01)
##
## CCMIO
##
VISIT_OPTION_DEFAULT(VISIT_CCMIO_DIR ${VISITHOME}/ccmio)
##
## CFITSIO
##
IF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio)
ENDIF (NOT CMAKE_CL_64)
##
## HDF4
##
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4)
VISIT_OPTION_DEFAULT(VISIT_HDF4_LIBDEP
JPEG_LIBRARY_DIR libjpeg
SZIP_LIBRARY_DIR szlibdll
ZLIB_LIBRARY_DIR zlib1
)
##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5)
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP
SZIP_LIBRARY_DIR szlibdll
ZLIB_LIBRARY_DIR zlib1
)
##
## NETCDF
##
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf)
##
## CGNS
##
VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns)
VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP
HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
##
## EXODUS
##
VISIT_OPTION_DEFAULT(VISIT_EXODUSII_DIR ${VISITHOME}/exodus)
VISIT_OPTION_DEFAULT(VISIT_EXODUSII_LIBDEP NETCDF_LIBRARY_DIR netcdf)
VISIT_OPTION_DEFAULT(VISIT_EXODUSII_LIBDEP NETCDF_LIBRARY_DIR netcdf)
#VISIT_OPTION_DEFAULT(VISIT_EXODUSII_LIBDEP NETCDF_LIBRARY_DIR netcdf ${VISIT_NETCDF_LIBDEP})
##
## GDAL
##
VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal-1.7.1)
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4)
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5)
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/lib/${VISIT_MSVC_VERSION} szlibdll)
##
## H5PART
##
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part)
VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP
HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
##
## MILI
##
VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/Mili)
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf)
##
## SILO
##
IF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo)
ELSE (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo_x64)
ENDIF (NOT CMAKE_CL_64)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP
HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib)
##
## Xdmf
## XDMF
##
IF (NOT MSVC_VERSION LESS 1400)
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/${VISIT_MSVC_VERSION})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
ENDIF (NOT MSVC_VERSION LESS 1400)
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/${VISIT_MSVC_VERSION})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP
HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP})
......@@ -2219,7 +2219,7 @@ avtDDCMDFileFormat::avtDDCMDFileFormat(const char *filename)
// only cgrid files were supported and the file was a zero length
// file.
//
int maxlen, lbuf;
int maxlen, lbuf=0;
char str[1024], *buf, *b;
FILE *file;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment