Install hdf5 component naming

Hi,

When packaging Plus toolkit on my side, I realized a possible issue
with the component naming of hdf5 installed target.

When packaging the project, the package missed the hdf5 dlls.

Here is the CPack script relevant line:

CPACK_INSTALL_CMAKE_PROJECTS "...;C:/JWS/cipluswin/arch/x86/bt/rel/x86rel/itk-bin;ITK;RuntimeLibraries;/;...)

After exploring the ThirdParty directory of ITK, I realized that most modules install their libs under the component name RuntimeLibraries. Ex:

  INSTALL(TARGETS itklbfgs
  EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
  RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
  LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
  ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development)

But the HDF5 module component names are libraries and cpplibraries. Indeed, adding these components to the the CPack line solves this issue:

set(CPACK_INSTALL_CMAKE_PROJECTS "...;C:/JWS/cipluswin/arch/x86/bt/rel/x86rel/itk-bin;ITK;cpplibraries;C:/JWS/cipluswin/arch/x86/bt/rel/x86rel/itk-bin;ITK;libraries;C:/JWS/cipluswin/arch/x86/bt/rel/x86rel/itk-bin;ITK;RuntimeLibraries;/;...)

But it’s a little bit counter-intuitive. Do I have a usage problem or is there a kind of heterogenous handling of component names in ITK third party modules?

Details:

  • Windows 10
  • ITK: 5.2.0
  • CMake: 3.22.0
  • Visual studio 2017

Thanks for your help,

1 Like

@cg2 indeed, this consistency of handling third party libraries is helpful.

Patches are welcome to improve the vendored HDF5 install components. Please work from ITK Git master, because many updates were made recently to HDF5.

1 Like