Commit e06e6531 authored by Dave DeMarle's avatar Dave DeMarle
Browse files

Merge branch '0012970-netcdf4-with-system-hdf5-rel' into release

Change-Id: Icf58e20d23a4fa0f61e1d30e53541ddda6ff17f8
parents 449d1cef 8918f03d
#
# Find the native HDF5 includes and library
# Note: this is deprecated, and will be removed entirely
# once vtk's min cmake >= 2.8.0
#
# HDF5_INCLUDE_DIR - where to find H5public.h, etc.
# HDF5_LIBRARIES - List of fully qualified libraries to link against when using hdf5.
......
......@@ -803,8 +803,11 @@ MARK_AS_ADVANCED(VTK_OPENGL_HAS_OSMESA
#-----------------------------------------------------------------------------
# Provide options to use system versions of third-party libraries.
VTK_THIRD_PARTY_OPTION(ZLIB zlib)
set(HDF5_FIND_COMPONENTS "HL;C")
VTK_THIRD_PARTY_OPTION(HDF5 hdf5)
INCLUDE(vtkHDF5Library)
IF(VTK_USE_GL2PS)
VTK_THIRD_PARTY_OPTION(GL2PS gl2ps)
ENDIF(VTK_USE_GL2PS)
......
......@@ -225,14 +225,15 @@ TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
SET(WORDS_BIGENDIAN ${CMAKE_WORDS_BIGENDIAN})
OPTION(NETCDF_ENABLE_CXX "Build netcdf C++ API" ON)
mark_as_advanced(NETCDF_ENABLE_CXX)
SET(CXX NETCDF_ENABLE_CXX)
OPTION(NETCDF_ENABLE_NETCDF4 "Build netcdf version 4 API" ON)
IF (NOT HDF5_BUILD_HL_LIB AND NETCDF_ENABLE_NETCDF4)
message("ENABLE_NETCDF4 not allowed because netcdf4 functionality requires HDF5_BUILD_HL_LIB.")
if (NETCDF_ENABLE_NETCDF4 AND NOT (HDF5_BUILD_HL_LIB OR HDF5_hdf5_hl_LIBRARY))
message("ENABLE_NETCDF4 not allowed because NETCDF4 requires HDF5_HL.")
SET(NETCDF_ENABLE_NETCDF4 OFF CACHE BOOL "Build netcdf version 4 API" FORCE)
ENDIF (NOT HDF5_BUILD_HL_LIB AND NETCDF_ENABLE_NETCDF4)
mark_as_advanced(NETCDF_ENABLE_NETCDF4)
endif (NETCDF_ENABLE_NETCDF4 AND NOT (HDF5_BUILD_HL_LIB OR HDF5_hdf5_hl_LIBRARY))
mark_as_advanced(NETCDF_ENABLE_NETCDF4)
SET(USE_NETCDF4 ${NETCDF_ENABLE_NETCDF4} CACHE INTERNAL "" FORCE)
if (NETCDF_ENABLE_NETCDF4)
......@@ -334,8 +335,13 @@ VTK_ADD_LIBRARY(vtkNetCDF
${netcdf_src4_SOURCES}
${netcdf_dispatch_SOURCES}
${netcdf_liblib_SOURCES})
IF (NETCDF_ENABLE_NETCDF4)
TARGET_LINK_LIBRARIES(vtkNetCDF ${VTK_HDF5_LIBRARIES})
if (VTK_USE_SYSTEM_HDF5)
TARGET_LINK_LIBRARIES(vtkNetCDF ${HDF5_hdf5_LIBRARY} ${HDF5_hdf5_hl_LIBRARY})
else()
TARGET_LINK_LIBRARIES(vtkNetCDF ${VTK_HDF5_LIBRARIES})
endif()
ENDIF (NETCDF_ENABLE_NETCDF4)
VTK_ADD_LIBRARY(vtkNetCDF_cxx ${netcdf_cxx_SOURCES})
......
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