Details
Description
I'm trying to wrap a project which uses directory names to "namespace" includes, i.e.
myproject/mycomponent/some_file.hpp
I can add those files to the wrapper for each object with "<include file-name=...>" directives, but most of the generated headers just include the global "#include <some_file.hpp>".
This would require to add all "local" component include directories to the global include path for the compiler, and might lead to problems with ambiguous filenames.
It would be helpful to include the path for discovered headers.
Some hints from my looking into the issue that might be helpful:
The problem seems to be in ApiExtractor/abstractmetabuilder.cpp - AbstractMetaBuilderPrivate::setInclude() where the the filepath is stripped and just the filename is used. The input for this method is the relative path from the current working dir, but it would need to be looked up in the include directories provided in the config, e.g. when setInclude is called with "my/lib/path/include/myproject/mycomponent/some_file.hpp", the method would have to match "my/lib/path/include" against the "include-path" or "system-include-paths" and extract the actual usable path given this compiler include configuration.
Attachments
For Gerrit Dashboard: PYSIDE-975 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
258119,7 | shiboken: Allow for include paths with relative directories | 5.12 | pyside/pyside-setup | Status: MERGED | -2 | 0 |