Skip to content

Fix CMake config file install paths to follow platform conventions#6174

Draft
lrknox wants to merge 2 commits intoHDFGroup:developfrom
lrknox:fix-standard-.cmake-install
Draft

Fix CMake config file install paths to follow platform conventions#6174
lrknox wants to merge 2 commits intoHDFGroup:developfrom
lrknox:fix-standard-.cmake-install

Conversation

@lrknox
Copy link
Collaborator

@lrknox lrknox commented Jan 26, 2026

Update HDF_DIR_PATHS macro to install hdf5-config.cmake and related files to platform-appropriate locations:

  • Windows (not Cygwin): /cmake/
  • Linux/Unix/Cygwin: /<lib_dir>/cmake/hdf5/
  • macOS Frameworks: <framework_prefix>/hdf5.framework/Resources/CMake/

Update HDF_DIR_PATHS macro to install hdf5-config.cmake and related
files to platform-appropriate locations:
- Windows (not Cygwin): <prefix>/cmake/
- Linux/Unix/Cygwin: <prefix>/<lib_dir>/cmake/hdf5/
- macOS Frameworks: <framework_prefix>/hdf5.framework/Resources/CMake/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# - Frameworks: <framework>/Resources/CMake/
# - Windows (not Cygwin): cmake/
# - Linux/Unix/Cygwin: ${CMAKE_INSTALL_LIBDIR}/cmake/<package_name>/
if (${package_prefix}_BUILD_FRAMEWORKS)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe only the Unixy changes need to be put in this particular spot. It seems unlikely that HDF5_USE_GNU_DIRS is going to be ON on Windows or Apple. There may be a use case for Apple, but that would seem to go against the frameworks approach anyway.

Add similar change to HDF5Examples/config/HDFMacros.cmake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To be triaged

Development

Successfully merging this pull request may close these issues.

2 participants