-
Notifications
You must be signed in to change notification settings - Fork 624
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
CMake: How to configure options for pnglibconf generation? #559
Comments
Yes. Modify the file pngusr.dfa instead. This is not cmake specific. pnglibconf.h should NEVER be modified; it's almost impossible to get right which is why the whole configuration stuff was created. See |
I think pngusr.dfa might not be included; it should be included immediately after pnglibconf.dfa. Support for DFA_XTRA is also desirable because that avoids the need to edit the checked-in source file. See Makefile.am line 310 on. I can't work out where this is in cmake. |
@flsobral pngusr.dfa does seem to be handled by cmake now, please can you verify it and it this is all fixed close this issue. |
@ctruta: fixed (by fixes in CMakeLists.txt et al.) |
Currently, this is how I use libpng in my cross platform project:
This works for me now, but I can't shake the feeling that there should be a way of configuring the options instead, but I couldn't find out how.
EDIT: Actually, pnglibconf.h gets overwritten by a new one during build. The only way I got it to work was using this instead:
file(READ ${libpng_BINARY_DIR}/pnglibconf.h FILE_CONTENTS)
This way the build fails the first time because the file isn't available, but subsequent builds works fine.
Overwriting the existing pnglibconf is the expected behavior?
The text was updated successfully, but these errors were encountered: