OpenGL independent helloworld on mac os x 10.4 and xcode

sanjuda
Posts: 7
Joined: Tue Jul 14, 2009 10:03 am

OpenGL independent helloworld on mac os x 10.4 and xcode

Post by sanjuda »

i think that this post can be interesting for other people that like me are newbie with xcode and cmake

I used the demo BasicDemo to build an independent program that used only the installed dynamic libraries (installed following what I wrote in http://www.bulletphysics.com/Bullet/php ... f=9&t=3825) .

i copied the directory Demos/BasicDemo in a new dir like prjs/basicdemo
and the directory Demos/OpenGL to prjs/basicdemo/OpenGL

and then I modified the CMakeLists.txt file as specified in the attachment

what i did is adding

Code: Select all

find_package(GLUT) 
find_package(OpenGL)
and removing

Code: Select all

SET(GLUT_ROOT ${BULLET_PHYSICS_SOURCE_DIR}/Glut)
and then I changed

Code: Select all

INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL }
to

Code: Select all

INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src OpenGL }
)
finally to generate the project for XCode:

Code: Select all

cmake -GXcode .