diff options
Diffstat (limited to 'config/cmake/HDFMacros.cmake')
-rw-r--r-- | config/cmake/HDFMacros.cmake | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index 4adc455..60ee6e8 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -81,14 +81,28 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) ENDIF (${compress_type} MATCHES "SVN") EXTERNALPROJECT_GET_PROPERTY (SZIP BINARY_DIR SOURCE_DIR) + IF (${BLDTYPE} MATCHES "Debug") + IF (WIN32 AND NOT MINGW) + IF (HDF_LEGACY_NAMING) + SET (DBG_EXT "d") + ELSE (HDF_LEGACY_NAMING) + SET (DBG_EXT "_D") + ENDIF (HDF_LEGACY_NAMING) + ELSE (WIN32 AND NOT MINGW) + SET (DBG_EXT "_debug") + ENDIF (WIN32 AND NOT MINGW) + ELSE (${BLDTYPE} MATCHES "Debug") + SET (DBG_EXT "") + ENDIF (${BLDTYPE} MATCHES "Debug") + IF (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) - SET (SZIP_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${CMAKE_IMPORT_LIBRARY_SUFFIX}") + SET (SZIP_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}szip${DBG_EXT}${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}") + SET (SZIP_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") ENDIF (WIN32 AND NOT MINGW) ELSE (${libtype} MATCHES "SHARED") - SET (SZIP_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libszip${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (SZIP_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libszip${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ENDIF (${libtype} MATCHES "SHARED") SET (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}") SET (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src") @@ -155,21 +169,35 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) ENDIF (${compress_type} MATCHES "SVN") EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR) + IF (${BLDTYPE} MATCHES "Debug") + IF (WIN32 AND NOT MINGW) + IF (HDF_LEGACY_NAMING) + SET (DBG_EXT "d") + ELSE (HDF_LEGACY_NAMING) + SET (DBG_EXT "_D") + ENDIF (HDF_LEGACY_NAMING) + ELSE (WIN32 AND NOT MINGW) + SET (DBG_EXT "_debug") + ENDIF (WIN32 AND NOT MINGW) + ELSE (${BLDTYPE} MATCHES "Debug") + SET (DBG_EXT "") + ENDIF (${BLDTYPE} MATCHES "Debug") + IF (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) - SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${CMAKE_IMPORT_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}zlib1${DBG_EXT}${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}") + SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}z${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}") ENDIF (WIN32 AND NOT MINGW) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) IF (HDF_LEGACY_NAMING) - SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/zlib${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/zlib${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ELSE (HDF_LEGACY_NAMING) - SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libzlib${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libzlib${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ENDIF (HDF_LEGACY_NAMING) ELSE (WIN32 AND NOT MINGW) - SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libz${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET (ZLIB_LIBRARY "${BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/libz${DBG_EXT}${CMAKE_STATIC_LIBRARY_SUFFIX}") ENDIF (WIN32 AND NOT MINGW) ENDIF (${libtype} MATCHES "SHARED") SET (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}") |