-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Differing include directory #4
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
Comments
This comes up from time to time. It's difficult to change the default header location because it would break existing code. What if it were an option to CMake? What build system are you using? |
I know it would break existing code, that's why I suggested to do it with the next major release (API break). I don't think adding an option to CMake that controls this would help, at least I wouldn't like to drop the additional check for the include directory then because both directories would still be supported. What would help is adding pkg-config support (perhaps have a look at this, I recently found it but didn't try it out), at least for those using the GNU build system – like me – but I personally would prefer a renaming of the include dir; also because quite some people are of the opinion that pkg-config should generally be avoided, independent of the build system used. |
I still don't think
What causes them to end up there? I don't understand what's wrong with a parameter to CMake. People using
should not be broken by our change, I think. |
It's the PKGBUILD of the jsoncpp package in the arch linux repositories:
Maybe I'm misunderstanding what you mean with a CMake parameter. Do you mean each project using jsoncpp should work around the possibility of having the json directory inside an additional jsoncpp directory (like here) or do you mean a CMake parameter in jsoncpp itself, giving packagers a simple option to change the directory the headers will be installed to? |
That is using a very old version of the package: Also, that is a custom build-script which specifies the project directory. The files are still included via
after We would not mind letting the builder choose the directory in |
About the PKGBUILD issues: You should probably tell the maintainer about that. But concerning this...
That's exactly what I don't like (although you're right that it would be even worse when they just renamed the It means that each project using jsoncpp has to add this flag to its build system to make it work on systems that work around the reuse of the |
|
Hi, I am using jsoncpp in one of my projects, which I am compiling natively and for the web with emscripten (basically works like any cross-compiler).
I found that finding the jsoncpp headers is a bit of an unnecessary hurdle there because by default they are installed in the directory
${prefix}/include/json
(that's what I have when cross-compiling), while in my native environment (arch linux), jsoncpp headers are in${prefix}/include/jsoncpp/json
to avoid conflicts with other packages using${prefix}/include/json
.Could you please change the include directories name from "json" to "jsoncpp" so packagers don't have to work around this anymore and the headers are found in one common place?
The text was updated successfully, but these errors were encountered: