summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-05-17 22:12:36 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-05-17 22:12:36 (GMT)
commit29411fc6023941428bbadb6eda8c944472e8d293 (patch)
treeb874ceec6604a960859c269eb74f32b4e89139a3
parent05ee8cdd184c18a1415440ea0f16d88f6b7b4759 (diff)
downloadhdf5-29411fc6023941428bbadb6eda8c944472e8d293.zip
hdf5-29411fc6023941428bbadb6eda8c944472e8d293.tar.gz
hdf5-29411fc6023941428bbadb6eda8c944472e8d293.tar.bz2
[svn-r20853] Add CPack commands to properly include extlibs into package
Tested: windows
-rw-r--r--CMakeLists.txt95
1 files changed, 16 insertions, 79 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60094c3..d16a902 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -722,84 +722,6 @@ IF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
-# Option for external libraries
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- IF (HDF5_PACKAGE_EXTLIBS)
- IF (WIN32 AND BUILD_SHARED_LIBS)
- SET (HDF5_INSTALL_EXTLIB_DIR ${HDF5_INSTALL_BIN_DIR})
- ELSE (WIN32 AND BUILD_SHARED_LIBS)
- SET (HDF5_INSTALL_EXTLIB_DIR ${HDF5_INSTALL_LIB_DIR})
- ENDIF (WIN32 AND BUILD_SHARED_LIBS)
- IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
- INSTALL (
- FILES ${ZLIB_INCLUDE_DIR}/zlib.h
- DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT headers
- )
- GET_PROPERTY (ZLIB_LIB TARGET ${ZLIB_LIBRARY} PROPERTY LOCATION_${BLDTYPE})
- INSTALL(
- FILES ${ZLIB_LIB}
- DESTINATION ${HDF5_INSTALL_EXTLIB_DIR}
- COMPONENT libraries
- )
- IF (BUILD_SHARED_LIBS)
- IF (WIN32)
- GET_PROPERTY (ZLIB_IMPLIB TARGET ${ZLIB_LIBRARY} PROPERTY IMPORTLIBRARY_${BLDTYPE})
- INSTALL(
- FILES ${ZLIB_IMPLIB}
- DESTINATION ${HDF5_INSTALL_LIB_DIR}
- COMPONENT libraries
- )
- ELSE (WIN32)
- GET_PROPERTY (ZLIB_SOVERSION TARGET ${ZLIB_LIBRARY} PROPERTY SOVERSION)
- INSTALL(
- FILES ${ZLIB_LIB}.${ZLIB_SOVERSION}
- DESTINATION ${HDF5_INSTALL_LIB_DIR}
- COMPONENT libraries
- )
- ENDIF (WIN32)
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
- IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
- INSTALL (
- FILES ${SZIP_INCLUDE_DIR}/szlib.h ${SZIP_INCLUDE_DIR}/szip_adpt.h ${SZIP_INCLUDE_DIR}/ricehdf.h
- DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT headers
- )
- GET_PROPERTY (SZIP_LIB TARGET ${SZIP_LIBRARY} PROPERTY LOCATION_${BLDTYPE})
- INSTALL(
- FILES ${SZIP_LIB}
- DESTINATION ${HDF5_INSTALL_EXTLIB_DIR}
- COMPONENT libraries
- )
- IF (BUILD_SHARED_LIBS)
- IF (WIN32)
- GET_PROPERTY (SZIP_IMPLIB TARGET ${SZIP_LIBRARY} PROPERTY IMPORTLIBRARY_${BLDTYPE})
- INSTALL(
- FILES ${SZIP_IMPLIB}
- DESTINATION ${HDF5_INSTALL_LIB_DIR}
- COMPONENT libraries
- )
- ELSE (WIN32)
- GET_PROPERTY (SZIP_SOVERSION TARGET ${SZIP_LIBRARY} PROPERTY SOVERSION)
- INSTALL(
- FILES ${SZIP_LIB}.${SZIP_SOVERSION}
- DESTINATION ${HDF5_INSTALL_LIB_DIR}
- COMPONENT libraries
- )
- ENDIF (WIN32)
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
- INSTALL (
- FILES ${EXTERNAL_HEADER_LIST}
- DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT headers
- )
- ENDIF (HDF5_PACKAGE_EXTLIBS)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
IF (NOT HDF5_EXTERNALLY_CONFIGURED)
@@ -935,10 +857,25 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
ELSE (WIN32)
SET (CPACK_RPM_COMPONENT_INSTALL ON)
ENDIF (WIN32)
+ SET (CPACK_MONOLITHIC_INSTALL ON)
- INCLUDE (CPack)
INCLUDE(InstallRequiredSystemLibraries)
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
+
+ IF (HDF5_PACKAGE_EXTLIBS)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
+ ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ IF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
+ ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ ENDIF (HDF5_PACKAGE_EXTLIBS)
+
+ INCLUDE (CPack)
+
#---------------------------------------------------------------------------
# Now list the cpack commands
#---------------------------------------------------------------------------