summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 7a0746a..6d05a58 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -104,9 +104,10 @@ endif ()
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- 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