[svn-r20156] Update macros to correct errors found on windows

This commit is contained in:
Allen Byrne 2011-02-25 09:30:43 -05:00
parent 251a65e448
commit b36793344f

View File

@ -62,7 +62,7 @@ ENDMACRO (PACKAGE_JPEG_LIBRARY)
MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
IF (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (SZIP
SVN_REPOSITORY ${SZIP_SVN_URL}
SVN_REPOSITORY ${SZIP_URL}
# [SVN_REVISION rev]
INSTALL_COMMAND ""
CMAKE_ARGS
@ -71,7 +71,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
)
ELSEIF (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (SZIP
URL ${SZIP_SVN_URL}
URL ${SZIP_URL}
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
@ -116,6 +116,10 @@ MACRO (PACKAGE_SZIP_LIBRARY compress_type libtype)
ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
IF (WIN32 AND NOT CYGWIN)
IF (${libtype} MATCHES "SHARED")
GET_FILENAME_COMPONENT(SZIP_DLL_NAME ${SZIP_LIBRARY} NAME_WE)
# MESSAGE (STATUS "SZIP_DLL_NAME: ${SZIP_DLL_NAME}")
GET_FILENAME_COMPONENT(SZIP_BIN_PATH ${SZIP_LIBRARY} PATH)
# MESSAGE (STATUS "SZIP_BIN_PATH: ${SZIP_BIN_PATH}")
SET (EXTERNAL_LIBRARYDLL_LIST ${EXTERNAL_LIBRARYDLL_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
ADD_CUSTOM_TARGET (SZIP-Dll-Copy ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_BIN_PATH}/${SZIP_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
@ -194,6 +198,10 @@ MACRO (PACKAGE_ZLIB_LIBRARY compress_type libtype)
ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
IF (WIN32 AND NOT CYGWIN)
IF (${libtype} MATCHES "SHARED")
GET_FILENAME_COMPONENT(ZLIB_DLL_NAME ${ZLIB_LIBRARY} NAME_WE)
# MESSAGE (STATUS "ZLIB_DLL_NAME: ${ZLIB_DLL_NAME}")
GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIBRARY} PATH)
# MESSAGE (STATUS "ZLIB_BIN_PATH: ${ZLIB_BIN_PATH}")
SET (EXTERNAL_LIBRARYDLL_LIST ${EXTERNAL_LIBRARYDLL_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
ADD_CUSTOM_TARGET (ZLIB-Dll-Copy ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_BIN_PATH}/${ZLIB_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/