The cmake configuration should provide transitive dependencies (like shlwapi
on MSVC)
#3663
Labels
Component - Build
CMake, Autotools
Priority - 2. Medium ⏹
It would be nice to have this in the next release
Type - Bug
Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Milestone
cmake is very good in collecting the list of library dependencies transitively for project trees. This typically works via the list of linker libraries. In order to make use of the automatic dependency tracking feature, dependencies that need to be linked downstream must be listed
PUBLIC
in the project. Every suchPUBLIC
dependency will then be linked into the final executable, and in turn, its dependencies are also (transitively) resolved and linked.Since #2407, hdf5 has a dependency on
shlwapi
on MSVC. However this seems not to be exposed to cmake. At least, when I use the following code in cmake, the build lacks a linker dependency onshlwapi
. I could not find out how to instruct cmake with hdf5 to get this dependency resolved. I can resolve it by linkingshlwapi
myself. But this is not ideal, because I need to maintain the dependency list of hdf5 in my own (user) code. This is unfortunate, because it creates an extra burden on users to keep dependency lists updated, which can be quite tedious for large software projects.Expected behavior
The following used to work until about a year ago. But it is no longer sufficient for me since the current release. This, or something similar, should just work:
Platform (please complete the following information)
Additional context
None.
The text was updated successfully, but these errors were encountered: