Help Building Box2D With CMake or MSYS

I've been trying for around 4 hours to get Box2D built so I can start learning how to use it, but the problem is I am having zero luck getting it compiled. I've searched Google and these forums for a while now and I have yet to come across some kind of wiki or step by step (I'd settle for every other step at this point) to get this to compile. I started out with CMake and every option I use gives me an error, after searching around for some kind of guide or FAQ on it so I gave up and went to MSYS, and I can't even find a simple generic guide like: "type 'cmake sourcedir builddir -options'" or anything of that nature (yes, I tried the help command). Building it in gave me a cagillian errors so I figured since I exhausted every avenue...I'd try my luck at the forums! 😕

So can anyone give me a link or anything to get me started using CMAKE, MSYS, or Codeblocks to build this? Or perhaps a brief step by step? I'll take any kind of help anyone can give me!

Thanks!
Guin
Did you read Building.txt?
I'm having a similar problem. I installed Box2D before cmake and I'm having trouble linking to my OpenGL. I'm on Ubuntu 10.10.

I'm getting:
Code:
michael@gamma:~/Box2D_v2.1.2/Box2D/Build$ cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON -DCMAKE_INSTALL_PREFIX=/opt/Box2D ..
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/michael/Box2D_v2.1.2/Box2D/freeglut
   used as include directory in directory /home/michael/Box2D_v2.1.2/Box2D/glui
   used as include directory in directory /home/michael/Box2D_v2.1.2/Box2D/Testbed

-- Configuring incomplete, errors occurred!

In the /Build/CMakeCache.txt file I see the place to fix this, but I'm not sure of what to put in. Again, I know this is a very inane question, but I'm having a lot of trouble understanding OpenGL.
EDIT: PROBLEM SOLVED

I had to install mesa dev libs (libgl1-mesa-dev, libglu1-mesa-dev, and mesa-common-dev) and X11 libs (at least libxi-dev).

The whole problem could have been avoided by getting it from the Ubuntu repositories (for me at least) with libbox2d0, libbox2d0-dbg, and libbox2d-dev.

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