diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-11-25 16:51:40 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-11-25 16:51:40 (GMT) |
commit | 8c1b4bc3c7939d923acea19a9d76c17b4ab09b07 (patch) | |
tree | 18a94e985ee249ebceb7de115dda59d10f209c47 | |
parent | f18d822ca5d6e76d6d401d0ef245807d4992ae6c (diff) | |
download | hdf5-8c1b4bc3c7939d923acea19a9d76c17b4ab09b07.zip hdf5-8c1b4bc3c7939d923acea19a9d76c17b4ab09b07.tar.gz hdf5-8c1b4bc3c7939d923acea19a9d76c17b4ab09b07.tar.bz2 |
[svn-r19845] Correct external library generated headers packing for install/cpack
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e85721..31f05b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -618,9 +618,15 @@ ENDIF (HDF5_ENABLE_SZIP_SUPPORT) #----------------------------------------------------------------------------- OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF) IF (HDF5_PACKAGE_EXTLIBS) + SET (EXTERNAL_HEADER_LIST "") SET (EXTERNAL_LIBRARY_LIST "") SET (EXTERNAL_LIBRARYDLL_LIST "") IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) + 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}/" + ) + SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h) ADD_CUSTOM_TARGET (ZLIB-Library-Copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_LIBRARY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COMMENT "Copying ${ZLIB_LIBRARY} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" @@ -628,11 +634,17 @@ IF (HDF5_PACKAGE_EXTLIBS) GET_FILENAME_COMPONENT(ZLIB_LIB_NAME ${ZLIB_LIBRARY} NAME) SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}) IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + ADD_DEPENDENCIES (ZLIB-GenHeader-Copy ZLIB) ADD_DEPENDENCIES (ZLIB-Library-Copy ZLIB) ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + 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}/" + ) + SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h) ADD_CUSTOM_TARGET (SZIP-Library-Copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_LIBRARY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COMMENT "Copying ${SZIP_LIBRARY} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" @@ -640,6 +652,7 @@ IF (HDF5_PACKAGE_EXTLIBS) GET_FILENAME_COMPONENT(SZIP_LIB_NAME ${SZIP_LIBRARY} NAME) SET (EXTERNAL_LIBRARY_LIST ${EXTERNAL_LIBRARY_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}) IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + ADD_DEPENDENCIES (SZIP-GenHeader-Copy SZIP) ADD_DEPENDENCIES (SZIP-Library-Copy SZIP) ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) @@ -872,18 +885,23 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED) IF (HDF5_PACKAGE_EXTLIBS) IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) INSTALL ( - FILES ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${ZLIB_INCLUDE_DIR}/zlib.h + FILES ${ZLIB_INCLUDE_DIR}/zlib.h DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT headers ) ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND) IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) INSTALL ( - FILES ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${SZIP_INCLUDE_DIR}/szlib.h ${SZIP_INCLUDE_DIR}/szip_adpt.h ${SZIP_INCLUDE_DIR}/ricehdf.h + FILES ${SZIP_INCLUDE_DIR}/szlib.h ${SZIP_INCLUDE_DIR}/szip_adpt.h ${SZIP_INCLUDE_DIR}/ricehdf.h DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT headers ) ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND) + INSTALL ( + FILES ${EXTERNAL_HEADER_LIST} + DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT headers + ) INSTALL( FILES ${EXTERNAL_LIBRARY_LIST} DESTINATION ${HDF5_INSTALL_LIB_DIR} |