Hi,
I've just written an cmake file for building box2d on linux.
name this CMakeLists.txt and put it into the build dir:
Simply run
and make your settings. Then run
Perhaps I enhance it such it also builds the hello world sample and testbed, too.
Enjoy.
EDIT: fixed missing source line
I've just written an cmake file for building box2d on linux.
name this CMakeLists.txt and put it into the build dir:
Code:
#-------------------------------------------------------------------------------
PROJECT (Box2D)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# set source and header vars
#-------------------------------------------------------------------------------
FILE (GLOB BOX2D_SOURCES
../Source/Collision/Shapes/*.cpp
../Source/Collision/*.cpp
../Source/Common/*.cpp
../Source/Dynamics/Contacts/*.cpp
../Source/Dynamics/Joints/*.cpp
../Source/Dynamics/*.cpp
)
FILE (GLOB BOX2D_HEADERS
../Source/Collision/*.h
../Source/Common/*.h
../Source/Dynamics/Contacts/*.h
../Source/Dynamics/Joints/*.h
../Source/Dynamics/*.h
)
SET ( LIBRARY_OUTPUT_PATH ../Library )
ADD_LIBRARY( Box2D SHARED ${BOX2D_HEADERS} ${BOX2D_SOURCES} )
PROJECT (Box2D)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# set source and header vars
#-------------------------------------------------------------------------------
FILE (GLOB BOX2D_SOURCES
../Source/Collision/Shapes/*.cpp
../Source/Collision/*.cpp
../Source/Common/*.cpp
../Source/Dynamics/Contacts/*.cpp
../Source/Dynamics/Joints/*.cpp
../Source/Dynamics/*.cpp
)
FILE (GLOB BOX2D_HEADERS
../Source/Collision/*.h
../Source/Common/*.h
../Source/Dynamics/Contacts/*.h
../Source/Dynamics/Joints/*.h
../Source/Dynamics/*.h
)
SET ( LIBRARY_OUTPUT_PATH ../Library )
ADD_LIBRARY( Box2D SHARED ${BOX2D_HEADERS} ${BOX2D_SOURCES} )
Simply run
Code:
ccmake .
and make your settings. Then run
Code:
make
Perhaps I enhance it such it also builds the hello world sample and testbed, too.
Enjoy.
EDIT: fixed missing source line