Closed alanjfs closed 4 years ago
Thanks! Doesn't this need a similar update for the Box2D include? I assume you didn't run into this one because of case-insensitive filesystems, but then I wonder why CMake needed the change.
Something like this could work I think:
/* Latest Box2D release from 2014 uses mixed case, current master (2020) uses
lowercase */
#ifdef __has_include
#if __has_include(<box2d/box2d.h>)
#include <box2d/box2d.h>
#else
#include <Box2D/Box2D.h>
#endif
/* If the compiler doesn't have __has_include, assume it's extremely old, and
thus an extremely old Box2D is more likely as well */
#else
#include <Box2D/Box2D.h>
#endif
You're right! I actually only tested this on my own code (on a Linux-box), but I should have also built the examples.
I see, that explains everything :)
Merged in 8ed6f5e9884c61db9c89c13d49f09a994a077574, together with fixing Yet Another Fun But Unnecessary Breakage in 5eb6fca6af7f9f506e3e2ad11fc1aa2fa57e0fa2.
Severe apologies for taking three centuries to merge PRs nowadays.
The latest release (as of this writing) of Box2D is from 2014 and uses mixed-case
Box2D.h
whereas the newer one is all lowercasebox2d.h
. This change adds support for the newer version, without breaking compatibility with the older one.Box2D also no longer provides a CMake
install()
directive, which can be gotten around like this.From..
To..