-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After 4.0.0 headers gets installed into include/utf8 using CMake #112
Comments
It gets installed directly under include:
|
Before 4.0.0
After:
Is that change intentional? It also seems a bit confusing as the rest of the project is referred to as utf8cpp? cmake/utf8cppTargets.cmake (in 4.0.1)
There are also distros reverting this change due to breakage with consumers |
Unfortunately, the headers are not only installed into a different folder, the CMake build system is broken. If this gets unnoticed, it is probably because utf8.h gets installed into the standard include directory, so it is found anyway, even if the dependency to utfcpp is not correctly specified. To see the issue, we need to use a non-standard include path, e.g. using a custom prefix. This is not a theoretical problem, currently, TagLib cannot be built without hacks on macOS using Homebrew because of this. It can be reproduced like this, first it is shown that it works correctly for version 3.2.5
Now the same with 4.0.1
Looking into $HOME/custom-prefix/share/utf8cpp/cmake/utf8cppTargets.cmake one sees that the imported target is now
Another possibility would be to use
I would suggest the following changes to fix it:
|
Also provide an imported target utf8::cpp for backward compatibility.
Fix CMake build system to use existing include directory (#112)
Fixed by @ufleisch, I think. |
@ufleisch |
I don't think this is actually fixed as the files are still installed to a different location as before. I haven't found a rationale anywhere for why the files were moved from |
This reverts the install path of the headers to the path that was used before the 4.x release series, unbreaking projects that were building against the library without using the CMake config files.
fix: revert to pre-4.x install path {prefix}/utf8cpp (see #112)
Hopefully fixed in 4.0.3 |
That doesn't seem to be intentional by looking at the rest of the source code?
The text was updated successfully, but these errors were encountered: