[svn-r20862] Adjust CPack configuration location by removing version extension in folder name. Add install configuration commands if ext libs are packaged with project.

This commit is contained in:
Allen Byrne 2011-05-18 12:50:32 -05:00
parent 976eb5e523
commit 089e81e86a
3 changed files with 12 additions and 5 deletions

View File

@ -727,7 +727,7 @@ ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
IF (NOT HDF5_EXTERNALLY_CONFIGURED)
INSTALL (
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/hdf5-${HDF5_PACKAGE_VERSION}
DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/hdf5
FILE hdf5-targets.cmake
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@ -768,7 +768,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
)
INSTALL (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config.cmake
DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/hdf5-${HDF5_PACKAGE_VERSION}
DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/hdf5
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
@ -782,7 +782,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
)
INSTALL (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config-version.cmake
DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/hdf5-${HDF5_PACKAGE_VERSION}
DESTINATION ${HDF5_INSTALL_DATA_DIR}/cmake/hdf5
)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)

View File

@ -63,8 +63,8 @@ FIND_PATH (HDF5_ROOT_DIR "hdf5-config.cmake"
HINTS ${_HDF5_HINTS}
PATHS ${_HDF5_PATHS}
PATH_SUFFIXES
lib/cmake/hdf5-1.9
share/cmake/hdf5-1.9
lib/cmake/hdf5
share/cmake/hdf5
)
FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h"

View File

@ -18,6 +18,7 @@ SET (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
SET (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
SET (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
SET (BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
#-----------------------------------------------------------------------------
# Directories
@ -57,6 +58,12 @@ SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
IF (NOT TARGET "hdf5")
IF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
INCLUDE (${SELF_DIR}/../ZLIB/ZLIB-targets.cmake)
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
IF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
INCLUDE (${SELF_DIR}/../SZIP/SZIP-targets.cmake)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS)
INCLUDE (${SELF_DIR}/hdf5-targets.cmake)
ENDIF (NOT TARGET "hdf5")