-
-
Notifications
You must be signed in to change notification settings - Fork 312
Closed
Labels
Component - BuildCMake, AutotoolsCMake, Autotools
Description
It is not possible to build against hdf5 when the lib is added with add_subdirectory. The header file H5pubconf.h can not be found the include_dirs.
All generated header files with public visibility should be configured into an extra directory like ${CMAKE_CURRENT_BUILD_DIR}/generated/h5 and this dir should be included with
target_include_directories(mylib PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BUILD_DIR}/generated>
$<INSTALL_INTERFACE:include/mylib> # <prefix>/include/mylib
)
Metadata
Metadata
Assignees
Labels
Component - BuildCMake, AutotoolsCMake, Autotools