box2d cmake

To build the latest svn revision on my mac, I've written CMakeLists to use with cmake (I'm using cmake version 2.8). I've read we're interested in porting box2d's official make system to cmake, so I'm sharing my setup.

I believe these files should work cross-platform, except for the Testbed example. I'm not sure how the opengl libraries will link in Linux and Windows, and tried to keep my mac specific directives in a conditional.

If we need help porting box2d's CMakeLists to OSX, I'd like to volunteer my help.
I've implemented CMake based largely on this contribution. Thanks Schpok.

I'm now asking for help to adjust the CMake files to work on other platforms beside Windows + Visual Studio.
I can help. Are you going to add these to the svn revision?
Yes, I put them in SVN.
Great, I'm working on some specific changes for the Apple platform. I see you've flattened the directory structure. Was there a particular reason for this?
Yes, I wanted the directory structure to match the library and Visual Studio structure.
Attached are two CMakelists with changes to enable XCode to build box2d. OSX's gl distribution is a little screwy and needs to be explicitly told not to use Apple's "framework" version, but its Unixy variant.

These changes should not affect other platforms; changes occur in APPLE conditional blocks. Therefore, it should be safe to substitute svn's version (revision 54) with these.

These files should overwrite the CMakelists in freeglut and Testbed.
Patches would probably be better.
I'm also working with Svenstaro on the files. Let's try to coordinate here:
http://code.google.com/p/box2d/issues/detail?id=77
Sure, done.

Original thread: https://box2d.org/forum/viewtopic.php?t=4168