[svn-r21340] Add check for target already exists

This commit is contained in:
Allen Byrne 2011-08-31 11:04:32 -05:00
parent 2f282ffa9d
commit 4cae0acb17

View File

@ -59,12 +59,12 @@ SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
IF (NOT TARGET "hdf5")
IF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
IF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
INCLUDE (${SELF_DIR}/../ZLIB/ZLIB-targets.cmake)
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
IF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
IF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
INCLUDE (${SELF_DIR}/../SZIP/SZIP-targets.cmake)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
INCLUDE (${SELF_DIR}/hdf5-targets.cmake)
SET (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
ENDIF (NOT TARGET "hdf5")