diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-10-22 15:47:29 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-10-22 15:47:29 (GMT) |
commit | 37ed7e8b5f3fc60a9816c84d1ed71c9ba50ade08 (patch) | |
tree | e41650ab12f6b5fad002bce6d79e9b47afcf47aa | |
parent | 3edabec156a2d87329e1bced861197b09e92f113 (diff) | |
download | hdf5-37ed7e8b5f3fc60a9816c84d1ed71c9ba50ade08.zip hdf5-37ed7e8b5f3fc60a9816c84d1ed71c9ba50ade08.tar.gz hdf5-37ed7e8b5f3fc60a9816c84d1ed71c9ba50ade08.tar.bz2 |
[svn-r28184] correct import targets
-rw-r--r-- | config/cmake_ext_mod/HDFLibMacros.cmake | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake index 7660a8a..3f91405 100644 --- a/config/cmake_ext_mod/HDFLibMacros.cmake +++ b/config/cmake_ext_mod/HDFLibMacros.cmake @@ -1,12 +1,12 @@ #------------------------------------------------------------------------------- -MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) +macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) # May need to build JPEG with PIC on x64 machines with gcc # Need to use CMAKE_ANSI_CFLAGS define so that compiler test works if (${compress_type} MATCHES "SVN") EXTERNALPROJECT_ADD (JPEG SVN_REPOSITORY ${JPEG_URL} - # [SVN_REVISION rev] + # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} @@ -18,7 +18,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic} - ) + ) elseif (${compress_type} MATCHES "GIT") EXTERNALPROJECT_ADD (JPEG GIT_REPOSITORY ${JPEG_URL} @@ -33,7 +33,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic} - ) + ) elseif (${compress_type} MATCHES "TGZ") EXTERNALPROJECT_ADD (JPEG URL ${JPEG_URL} @@ -49,34 +49,34 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic} - ) + ) endif (${compress_type} MATCHES "SVN") - externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR) + externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR) -##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) +##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) # Create imported target jpeg-static add_library(jpeg-static STATIC IMPORTED) -# Create imported target jpeg-shared - add_library(jpeg-shared SHARED IMPORTED) - if (BUILD_SHARED_LIBS) - HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "") - add_dependencies (JPEG jpeg-shared) - set (JPEG_SHARED_LIBRARY "jpeg-shared") - set (JPEG_LIBRARIES ${JPEG_shared_LIBRARY}) - endif (BUILD_SHARED_LIBS) HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "") add_dependencies (JPEG jpeg-static) set (JPEG_STATIC_LIBRARY "jpeg-static") set (JPEG_LIBRARIES ${JPEG_static_LIBRARY}) - + if (BUILD_SHARED_LIBS) + # Create imported target jpeg-shared + add_library(jpeg-shared SHARED IMPORTED) + HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "") + add_dependencies (JPEG jpeg-shared) + set (JPEG_SHARED_LIBRARY "jpeg-shared") + set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_shared_LIBRARY}) + endif (BUILD_SHARED_LIBS) + set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}") set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src") set (JPEG_FOUND 1) set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR}) -ENDMACRO (EXTERNAL_JPEG_LIBRARY) +endmacro (EXTERNAL_JPEG_LIBRARY) #------------------------------------------------------------------------------- -MACRO (PACKAGE_JPEG_LIBRARY compress_type) +macro (PACKAGE_JPEG_LIBRARY compress_type) add_custom_target (JPEG-GenHeader-Copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${JPEG_INCLUDE_DIR_GEN}/jconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" @@ -85,14 +85,14 @@ MACRO (PACKAGE_JPEG_LIBRARY compress_type) if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") add_dependencies (JPEG-GenHeader-Copy JPEG) endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") -ENDMACRO (PACKAGE_JPEG_LIBRARY) +endmacro (PACKAGE_JPEG_LIBRARY) #------------------------------------------------------------------------------- -MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding) +macro (EXTERNAL_SZIP_LIBRARY compress_type encoding) if (${compress_type} MATCHES "SVN") EXTERNALPROJECT_ADD (SZIP SVN_REPOSITORY ${SZIP_URL} - # [SVN_REVISION rev] + # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} @@ -105,11 +105,11 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding) -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS} -DSZIP_ENABLE_ENCODING:BOOL=${encoding} - ) + ) elseif (${compress_type} MATCHES "GIT") EXTERNALPROJECT_ADD (SZIP GIT_REPOSITORY ${SZIP_URL} - # [SVN_REVISION rev] + # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} @@ -122,7 +122,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding) -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS} -DSZIP_ENABLE_ENCODING:BOOL=${encoding} - ) + ) elseif (${compress_type} MATCHES "TGZ") EXTERNALPROJECT_ADD (SZIP URL ${SZIP_URL} @@ -139,34 +139,34 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding) -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS} -DSZIP_ENABLE_ENCODING:BOOL=${encoding} - ) + ) endif (${compress_type} MATCHES "SVN") - externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR) + externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR) -##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) +##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) # Create imported target szip-static add_library(szip-static STATIC IMPORTED) -# Create imported target szip-shared - add_library(szip-shared SHARED IMPORTED) - if (BUILD_SHARED_LIBS) - HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "") - add_dependencies (SZIP szip-shared) - set (SZIP_SHARED_LIBRARY "szip-shared") - set (SZIP_LIBRARIES ${SZIP_shared_LIBRARY}) - endif (BUILD_SHARED_LIBS) HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "") add_dependencies (SZIP szip-static) set (SZIP_STATIC_LIBRARY "szip-static") set (SZIP_LIBRARIES ${SZIP_static_LIBRARY}) + if (BUILD_SHARED_LIBS) + # Create imported target szip-shared + add_library(szip-shared SHARED IMPORTED) + HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "") + add_dependencies (SZIP szip-shared) + set (SZIP_SHARED_LIBRARY "szip-shared") + set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_shared_LIBRARY}) + endif (BUILD_SHARED_LIBS) set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}") set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src") set (SZIP_FOUND 1) set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR}) -ENDMACRO (EXTERNAL_SZIP_LIBRARY) +endmacro (EXTERNAL_SZIP_LIBRARY) #------------------------------------------------------------------------------- -MACRO (PACKAGE_SZIP_LIBRARY compress_type) +macro (PACKAGE_SZIP_LIBRARY compress_type) add_custom_target (SZIP-GenHeader-Copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" @@ -175,14 +175,14 @@ MACRO (PACKAGE_SZIP_LIBRARY compress_type) if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") add_dependencies (SZIP-GenHeader-Copy SZIP) endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") -ENDMACRO (PACKAGE_SZIP_LIBRARY) +endmacro (PACKAGE_SZIP_LIBRARY) #------------------------------------------------------------------------------- -MACRO (EXTERNAL_ZLIB_LIBRARY compress_type) +macro (EXTERNAL_ZLIB_LIBRARY compress_type) if (${compress_type} MATCHES "SVN") EXTERNALPROJECT_ADD (ZLIB SVN_REPOSITORY ${ZLIB_URL} - # [SVN_REVISION rev] + # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} @@ -194,11 +194,11 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS} - ) + ) elseif (${compress_type} MATCHES "GIT") EXTERNALPROJECT_ADD (ZLIB GIT_REPOSITORY ${ZLIB_URL} - # [SVN_REVISION rev] + # [SVN_REVISION rev] INSTALL_COMMAND "" CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} @@ -210,7 +210,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS} - ) + ) elseif (${compress_type} MATCHES "TGZ") EXTERNALPROJECT_ADD (ZLIB URL ${ZLIB_URL} @@ -226,39 +226,39 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS} - ) + ) endif (${compress_type} MATCHES "SVN") - externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR) + externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR) if (WIN32) set (ZLIB_LIB_NAME "zlib") else (WIN32) set (ZLIB_LIB_NAME "z") endif (WIN32) -##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) +##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) # Create imported target zlib-static add_library(zlib-static STATIC IMPORTED) -# Create imported target zlib-shared - add_library(zlib-shared SHARED IMPORTED) - if (BUILD_SHARED_LIBS) - HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "") - add_dependencies (ZLIB zlib-shared) - set (ZLIB_SHARED_LIBRARY "zlib-shared") - set (ZLIB_LIBRARIES ${ZLIB_SHARED_LIBRARY}) - endif (BUILD_SHARED_LIBS) HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "") add_dependencies (ZLIB zlib-static) set (ZLIB_STATIC_LIBRARY "zlib-static") set (ZLIB_LIBRARIES ${ZLIB_static_LIBRARY}) + if (BUILD_SHARED_LIBS) + # Create imported target zlib-shared + add_library(zlib-shared SHARED IMPORTED) + HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "") + add_dependencies (ZLIB zlib-shared) + set (ZLIB_SHARED_LIBRARY "zlib-shared") + set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY}) + endif (BUILD_SHARED_LIBS) set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}") set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}") set (ZLIB_FOUND 1) set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR}) -ENDMACRO (EXTERNAL_ZLIB_LIBRARY) +endmacro (EXTERNAL_ZLIB_LIBRARY) #------------------------------------------------------------------------------- -MACRO (PACKAGE_ZLIB_LIBRARY compress_type) +macro (PACKAGE_ZLIB_LIBRARY compress_type) add_custom_target (ZLIB-GenHeader-Copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" @@ -267,4 +267,4 @@ MACRO (PACKAGE_ZLIB_LIBRARY compress_type) if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") add_dependencies (ZLIB-GenHeader-Copy ZLIB) endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ") -ENDMACRO (PACKAGE_ZLIB_LIBRARY) +endmacro (PACKAGE_ZLIB_LIBRARY) |