cMake fails in making Box2D's Libraries

Hi, I'm new to Box2D and to CMake. I found out about Box2d and followed the instructions for installing it and everything; but during the process of using CMake I got a warning that I should add some code to CMakeLists.txt, and that (i think it meant this) it failed to make some libraries for Box2D. I it did succeed in making some of the files necessary, so I decided to give continuing a whirl, but these libraries are crucial. It was a forlorn hope. Anyways, I search Google and couldn't find anything that seemed relevant. Here is the entire output from CMake:

Code:
Configuring done
CMake Warning (dev) at Testbed/CMakeLists.txt:70 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "Testbed" links to some libraries for which the linker must
  search:

    GL, GLU, GLUT, X11

  and other libraries with known full path:

    /Applications/iPlatformer/Box2D_v2.1.2/Box2D/Build/Box2D/libBox2D.a
    /Applications/iPlatformer/Box2D_v2.1.2/Box2D/Build/freeglut/libfreeglut_static.a
    /Applications/iPlatformer/Box2D_v2.1.2/Box2D/Build/glui/libglui.a

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

Generating done


I'm not sure it was is all necessary. If you think you know what the problem is and how to fix it, I would really appreciate the help!!
I think you can ignore that warning. I'm not sure what it means.
Ok, I'm glad I don't have to worry about that at least. I am still having trouble with getting anything to really run on my windows and on my Mac. I tried building Box2D.sln, and it worked. But when i tried building the test bed file, it gives me this error:

"unable to start program '...\Box2Dv2.0.1\Box2D\Build\VC8\../../library/Box2D.lib'.
The system cannot find the specified file.

I get another error on the Mac, but I'll have to go and double check that it is the same thing. Once I get on to my Mac again I'll send what the other error is.. Does any one know what I can do for this error? I don't know if its a problem, but I am using a free trial of Microsoft Visual Studio 2010.

Thanks so much for your earlier post by the way, it definitely helped.
Ok, I tried following the instructions for Unix computers, in my case, an iMac. I got to the point where you tell it to "make",
and it returns this error after going through a series of building .o files, and it does a running sum that goes to 100%... anyways, I am not sure why, but it seem like I am missing necessary files- but I never deleted anything; and I doubt this set of files being incomplete.

Code:
Scanning dependencies of target Testbed
[ 97%] Building CXX object Testbed/CMakeFiles/Testbed.dir/Framework/Main.o
[ 98%] Building CXX object Testbed/CMakeFiles/Testbed.dir/Framework/Render.o
[ 99%] Building CXX object Testbed/CMakeFiles/Testbed.dir/Framework/Test.o
[100%] Building CXX object Testbed/CMakeFiles/Testbed.dir/Tests/TestEntries.o
Linking CXX executable Testbed
ld: library not found for -lGLUT
collect2: ld returned 1 exit status
make[2]: *** [Testbed/Testbed] Error 1
make[1]: *** [Testbed/CMakeFiles/Testbed.dir/all] Error 2
make: *** [all] Error 2


its more important that this work in my Mac environment, so if I can at least figure this out, I should be ok. Thanks so much for taking a look!
shiningcartoonist wrote:
"unable to start program '...\Box2Dv2.0.1\Box2D\Build\VC8\../../library/Box2D.lib'.
The system cannot find the specified file.


This is troubling. Which version of Box2D are you using? CMake files did not ship with version 2.0.1.
I downloaded my version from this link:
http://code.google.com/p/box2d/

I thought it was the one that came from your website.. Maybe I got mixed up. I am using 2.0.1

Is there a version you'd reccommend? I've been out luck for the past few days trying to figure it out, and I'm more amazed that it doesn't work on two totally different computers.

In the mean time, I'll try going to the version below 2.0.1, which ever it is and see if that doesn't work.
correction, I had 2.1.2
I'll try another vserion lower than 2.0.1 though
Plenty of people are building and running 2.1.2 just fine using CMake. You should focus on that version.

Keep in mind that CMake does compile or link anything. It just makes project/make files for you.

You should focus on getting a visual studio build going first. There are instructions in Building.txt.
Alright, I have good news: I redownloaded version 2.1.2; and on my windows computer it works like a charm.

My Mac is still having trouble and i'm following Building.txt's instructions, though I think I found the root of the problem:
Code:
root-admins-imac:Build rootadmin$ cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON
CMake Error: The source directory "/Applications/iPlatformer/Box2D_v2.1.2/Box2D/Build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.


I tried simply copying and pasting a file from another directory named CMakeLists.txt, but it realized its not the right one or something. Any ideas as to what this might be? i know you said the other version doesn't come with CMakeLists.txt, but is this one the same? How can i fix this?

PS: Sorry that I probably look like an idiot who doesn't know how to follow instructions..
It looks like cmake is using the wrong source directory. I don't know how to set that on the mac.

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