Wrong dir `include` if tag `CONFIGURATION_NAME` is set

#25 · closed · 8 comments

View on GitHub ↗

es20490446e

While building, if you add the flag `CONFIGURATION_NAME`, headers install into: `/usr/include/c++utilities-whatever/c++utilities` Instead of: `/usr/include/c++utilities-whatever`

Comments

Martchus

This is correct behavior and important so includes like `#include <c++utilities/application/global.h>` still work - because that's how one is supposed to use headers of this library from external projects. If you use the CMake module or pkg-config correctly then the include path should be added automatically. Otherwise just add it as needed.

Martchus

Considering that Arch Linux and Debian packaging is using this feature I doubt it is buggy. If you nevertheless think so please provide more details to reproduce.

es20490446e

Let me have a look 👀

es20490446e

Okay, I figured it out by digging into the [`qtutilities` Debian package](https://packages.debian.org/sid/libmartchus-qtutilities-dev) and [`CMakeLists.txt`](https://github.com/Martchus/cpp-utilities/blob/master/CMakeLists.txt). While running `cmake` I had to add the flag `CONFIGURATION_PACKAGE_SUFFIX`. I don't understand that while reading [`buildvariables.md`](https://github.com/Martchus/cpp-utilities/blob/master/doc/buildvariables.md). It says: > * Set `CONFIGURATION_PACKAGE_SUFFIX` to use libraries built with `CONFIGURATION_NAME`. I guess it shall say something like: > * Set `PACKAGE_NAMESPACE_PREFIX` to look for library headers with a custom prefix. > * Set `CONFIGURATION_PACKAGE_SUFFIX` to look for library headers with a custom suffix.

Martchus

It should not say anything about headers because that's too specific. This is about all kinds of files the library consists of (the library itself, CMake modules, scripts, …). `PACKAGE_NAMESPACE_PREFIX` should have documentation. This feature has been contributed by Debian and they didn't add documentation at the time.

es20490446e

It can say: "for example headers".

Martchus

I've just pushed a documentation change. So I suppose this issue can be closed.

es20490446e

Thanks! 👌