[contribution] Platform/CMake

I posted about something similar before, but I've cleaned it up a bit. Just unzip the file and put the CMake folder in the Platforms folder. Then, to compile:

Code:
cd Box2D/Contributions/Platforms/CMake
cmake .
make


That will build Box2D as a static library, and compile the HelloWorld program. I couldn't get the TestBed to work unfortunately, I don't know if it's a bug in the latest release or something on my end.

The nice thing about this is that it doesn't require any IDE, it should work on all platforms, and will work on future versions of Box2D as long as Erin doesn't change the directory structure too much. I think there's a GUI available for Windows too.

Edit: Updated. Now compiles TestBed. Erin has warned me that this might not be future-compatible though.
Awesome, thanks!
Nice one, darkzerox. Dodgy compilation has always been a thorn in Box2D's side.
Updated the CMake file. TestBed now compiles... as soon as Erin changes the capitalization in a few files.

Edit: Erin fixed it. Works now. Grab new ver in first post.
CMake (and most other build systems) would be a lot easier to maintain after the long sought after code restructuring is performed.

Erin - still waiting and willing to dig my hands into it before the next release 😉.
I tried this, and it didn't seem to work (I'm on Linux and using rev22 of Box2D from google code), so I wrote my own and thought I might as well post it here.

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