Skip to content

install_headers() should also install headers into intermediate directories #7911

@CoffeeFlux

Description

@CoffeeFlux

Copying from #2546, which was closed but AFAIK without the problem being resolved.

install_headers() and configure_file() with the install_dir option set should install headers into meson-private/include-intermediates during the meson config phase .

Many 3rd packages have header files and source files in same directory but install header files into a subdirectory after install, so this will cause an error finding the header files when using them in a subproject.

The workaround, as suggested by @nirbheek:

Yes, there is a way around this. You can copy the headers to the build directory into the subdir that you use when installed with configure_file(), and then create an include_directories() object that points to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions