seacas icon indicating copy to clipboard operation
seacas copied to clipboard

Exported targets are missing include directories in usage requirements

Open mathstuf opened this issue 4 years ago • 5 comments
trafficstars

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

mathstuf avatar Jul 22 '21 19:07 mathstuf

PR welcomed...

gsjaardema avatar Jul 22 '21 19:07 gsjaardema

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...

gsjaardema avatar Jul 22 '21 20:07 gsjaardema

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.

mathstuf avatar Jul 22 '21 20:07 mathstuf

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?

gsjaardema avatar Jul 22 '21 21:07 gsjaardema

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.

mathstuf avatar Jul 22 '21 22:07 mathstuf

The TriBITs was updated and hopefully addresses this issue.

gsjaardema avatar Sep 12 '22 23:09 gsjaardema

This should have been fixed by the TriBITs update. We can reopen if it is till a problem.

gsjaardema avatar Oct 04 '22 20:10 gsjaardema