diff options
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r-- | CMakeInstallation.cmake | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index dc229d2..c7a0691 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -41,13 +41,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) #----------------------------------------------------------------------------- # Export all exported targets to the build tree for use by parent project #----------------------------------------------------------------------------- - if (NOT HDF5_EXTERNALLY_CONFIGURED) - export ( - TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT} - FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake - NAMESPACE ${HDF_PACKAGE_NAMESPACE} - ) - endif () + export ( + TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT} + FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake + NAMESPACE ${HDF_PACKAGE_NAMESPACE} + ) endif () #----------------------------------------------------------------------------- @@ -104,15 +102,10 @@ endif () # Configure the hdf5-config-version .cmake file for the install directory #----------------------------------------------------------------------------- if (NOT HDF5_EXTERNALLY_CONFIGURED) - # 3.11 or greater - #write_basic_package_version_file ( - # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake - # VERSION ${HDF5_PACKAGE_VERSION} - # COMPATIBILITY SameMinorVersion - #) - configure_file ( - ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in - ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY + write_basic_package_version_file ( + "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake" + VERSION ${HDF5_PACKAGE_VERSION} + COMPATIBILITY SameMinorVersion ) install ( FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @@ -201,8 +194,7 @@ endif () #----------------------------------------------------------------------------- if (NOT HDF5_EXTERNALLY_CONFIGURED) install ( - FILES - ${HDF5_SOURCE_DIR}/COPYING + FILES ${HDF5_SOURCE_DIR}/COPYING DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) |