Closed christophe-f8 closed 3 years ago
Hi! The changes to the nanovg.c looks good, but I cant accept the cmake file as I cannot maintain it. Would you mind updating the PR to remove the cmakelist.txt?
On Tue, Sep 15, 2020 at 5:52 AM christophe-f8 notifications@github.com wrote:
I'm working on a large project with many libraries and applications and I use stb_image and/or nanovg in several of them. Since stb_image is linked using a preprocessor definition (STB_IMAGE_IMPLEMENTATION) linked errors occurred when using both nanovg and some of my libraries using stb_image (attempt to link twice).
I made a small fix by disabling the use of stb_image in NanoVG by using a single preprocessor definition (NVG_NO_STB), which is undefined by default (i.e. STB is used by default), so this should have no effect at all for everyone, unless you manually add that definition.
Also, I've added a CMakeLists for building purposes.
You can view, comment on, or merge this pull request online at:
https://github.com/memononen/nanovg/pull/587 Commit Summary
- Added a preprocessor definition to disable the use of stb_image + Added CMakeLists
File Changes
- A CMakeLists.txt https://github.com/memononen/nanovg/pull/587/files#diff-af3b638bc2a3e6c650974192a53c7291 (19)
- M src/nanovg.c https://github.com/memononen/nanovg/pull/587/files#diff-c1ba71c217de7bbe3b1a518dc5baa765 (5)
Patch Links:
- https://github.com/memononen/nanovg/pull/587.patch
- https://github.com/memononen/nanovg/pull/587.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/memononen/nanovg/pull/587, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIBXSHD5JMZZNPUZLPMN73SF3JIJANCNFSM4RMM7FJQ .
Sure, I removed CMakeLists.txt. It's pretty easy to write anyway should one need to.
I've updated my fork and I assume that it updates the PR as well, but let me know if I need to do something else (I'm really new to committing/pushing on GitHub)
Merged, thanks for improvement!
I'm working on a large project with many libraries and applications and I use stb_image and/or nanovg in several of them. Since stb_image is linked using a preprocessor definition (STB_IMAGE_IMPLEMENTATION) linked errors occurred when using both nanovg and some of my libraries using stb_image (attempt to link twice).
I made a small fix by disabling the use of stb_image in NanoVG by using a single preprocessor definition (NVG_NO_STB), which is undefined by default (i.e. STB is used by default), so this should have no effect at all for everyone, unless you manually add that definition.
Also, I've added a CMakeLists for building purposes.