diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-11-25 16:52:10 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-11-25 16:52:10 (GMT) |
commit | 8f23cabbd8a4e872338d003351d87f97c3fa9569 (patch) | |
tree | b79503a926cf6acdffbf7053e18a9e8019e99377 /CMakeLists.txt | |
parent | 60b792758aa0ac3d5671a53105d7b394ebcab972 (diff) | |
download | hdf5-8f23cabbd8a4e872338d003351d87f97c3fa9569.zip hdf5-8f23cabbd8a4e872338d003351d87f97c3fa9569.tar.gz hdf5-8f23cabbd8a4e872338d003351d87f97c3fa9569.tar.bz2 |
[svn-r19846] Correct external library generated headers packing for install/cpack
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d377770..7ee12ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -620,9 +620,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}/" @@ -630,11 +636,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}/" @@ -642,6 +654,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) @@ -874,18 +887,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} |