[svn-r19573] Adjust external library names depending on build type for ExternalProject Command

Tested: local linux, windows
This commit is contained in:
Allen Byrne 2010-10-11 15:36:03 -05:00
parent 91029a6dba
commit 293e541644

View File

@ -479,13 +479,25 @@ IF (HDF5_ENABLE_Z_LIB_SUPPORT)
EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR)
IF (BUILD_SHARED_LIBS)
SET (ZLIB_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${CMAKE_IMPORT_LIBRARY_SUFFIX}"
)
IF (WIN32 AND NOT MINGW)
SET (ZLIB_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${CMAKE_IMPORT_LIBRARY_SUFFIX}"
)
ELSE (WIN32 AND NOT MINGW)
SET (ZLIB_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
ENDIF (WIN32 AND NOT MINGW)
ELSE (BUILD_SHARED_LIBS)
SET (ZLIB_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libzlib${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
IF (WIN32 AND NOT MINGW)
SET (ZLIB_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/zlib${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
ELSE (WIN32 AND NOT MINGW)
SET (ZLIB_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libz${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
ENDIF (WIN32 AND NOT MINGW)
ENDIF (BUILD_SHARED_LIBS)
SET (ZLIB_INCLUDE_DIR_GEN
"${BINARY_DIR}"
@ -542,13 +554,19 @@ IF (HDF5_ENABLE_SZIP_SUPPORT)
IF (BUILD_SHARED_LIBS)
SET (SZIP_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${CMAKE_IMPORT_LIBRARY_SUFFIX}"
)
IF (WIN32 AND NOT MINGW)
SET (SZIP_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${CMAKE_IMPORT_LIBRARY_SUFFIX}"
)
ELSE (WIN32 AND NOT MINGW)
SET (SZIP_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}szip${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
ENDIF (WIN32 AND NOT MINGW)
ELSE (BUILD_SHARED_LIBS)
SET (SZIP_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libszip${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
SET (SZIP_LIBRARY
"${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libszip${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
ENDIF (BUILD_SHARED_LIBS)
SET (SZIP_INCLUDE_DIR_GEN
"${BINARY_DIR}"