Add namespace name to include directory to adhere to modern C++ project structure #667
Replies: 2 comments 1 reply
-
While it may seem nice, it's very much a stylistic choice that differs between different libraries. More importantly, vcpkg package has existed for 5 years; I don't maintain vcpkg port myself but I hope the maintainers don't make this change because it will break the build for anyone who uses it. Unprefixed header path is how pugixml has been used in every other environment (outside vcpkg) as well for more than 15 years; consistency between environments is important, and making a change here breaks compatibility and consistency. |
Beta Was this translation helpful? Give feedback.
-
This is very reasonable request. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When installing pugixml using vcpkg, the package is structured as follows:
|── include/ # Public headers
| │ │ ├── pugixml.hpp # Main header for the pugixml library
| │ │ └── pugiconfig.hpp # Configuration header
This leads to the include in any project using these headers to look like this:
An improvement would be to add the namespace name as an intermediate directory to adhere to modern C++ project structure:
|── include/ # Public headers
| │ │ ├── pugixml/ # Namespace for headers
| │ │ │ ├── pugixml.hpp # Main header for the pugixml library
| │ │ │ └── pugiconfig.hpp # Configuration header
This would make the inclusion of the header as such:
This might be a bit nitpicky, since the public headers consists of a single header, but it would be nice if it adhered to the modern C++ project structure.
Beta Was this translation helpful? Give feedback.
All reactions