summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-10-11 20:36:03 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-10-11 20:36:03 (GMT)
commit293e541644a9c5bc98067d8050f70c8e629eea5d (patch)
tree02f9b7bd0ae849b74f2853f5b04b6553b31e5399 /CMakeLists.txt
parent91029a6dba4f962dafd9520a0a6dafcbc374919e (diff)
downloadhdf5-293e541644a9c5bc98067d8050f70c8e629eea5d.zip
hdf5-293e541644a9c5bc98067d8050f70c8e629eea5d.tar.gz
hdf5-293e541644a9c5bc98067d8050f70c8e629eea5d.tar.bz2
[svn-r19573] Adjust external library names depending on build type for ExternalProject Command
Tested: local linux, windows
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
1 files changed, 30 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a876f7b..2dfe014 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}"