seacas
seacas copied to clipboard
Exported targets are missing include directories in usage requirements
The exported targets from (at least) the ioss library is missing include directories. This means that just doing target_link_libraries(mytgt PRIVATE Ioss) is not sufficient to use it; instead SEACASIoss_INCLUDE_DIRS must be manually used. Instead, each target should provide this as part of its usage requirements automatically.
Cc: @utkarshayachit
PR welcomed...
Or more information. IOSS has primarily been used internally, so I don't have much experience with what is needed to make it easier to use for external packages. Willing to learn...
It's all wrapped up in the TriBITS package logic. I suspect that the new TriBITS stuff should make the installed targets more useful, but I'm not sure.
I am able to make use of what is installed at least by manually adding the include directory at the expense of the VTK::ioss target not being as useful once VTK is installed…which is not really a concern. But it'd be nice if it could be consumed just by its target name.
OK, that makes sense. Is there anything I can do to workaround the TriBITS logic for just Exodus and IOSS that would help you? Maybe selectable via a setting?
You can do this:
target_include_directories(Ioss INTERFACE "$<INSTALL_INTERFACE:${include_install_dir}>")
where ${include_install_dir} is whatever TriBITS passes to DESTINATION for the header installation. Repeat for other library targets as necessary.
The TriBITs was updated and hopefully addresses this issue.
This should have been fixed by the TriBITs update. We can reopen if it is till a problem.