2011-01-14 16:05:45 +00:00
|
|
|
# Minimum cmake version required
|
2012-07-31 21:48:35 +00:00
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
2011-01-14 16:05:45 +00:00
|
|
|
|
|
|
|
# Project configuration
|
2012-07-31 21:48:35 +00:00
|
|
|
PROJECT(REACTPHYSICS3D)
|
|
|
|
|
|
|
|
# Where to build the library
|
|
|
|
SET(LIBRARY_OUTPUT_PATH lib/)
|
|
|
|
|
|
|
|
# Options
|
|
|
|
OPTION(COMPILE_EXAMPLES "Select this if you want to build the examples" OFF)
|
2011-01-14 16:05:45 +00:00
|
|
|
|
|
|
|
# Headers
|
2012-07-31 21:48:35 +00:00
|
|
|
INCLUDE_DIRECTORIES(src)
|
2011-01-14 16:05:45 +00:00
|
|
|
|
|
|
|
# Library configuration
|
|
|
|
file (
|
|
|
|
GLOB_RECURSE
|
|
|
|
source_files
|
|
|
|
src/*
|
|
|
|
)
|
|
|
|
|
2012-07-31 21:48:35 +00:00
|
|
|
# Require the reactphysics3d code to be compiled in a static library
|
|
|
|
ADD_LIBRARY (
|
2011-01-14 16:05:45 +00:00
|
|
|
reactphysics3d
|
|
|
|
STATIC
|
|
|
|
${source_files}
|
|
|
|
)
|
2012-07-31 21:48:35 +00:00
|
|
|
|
|
|
|
# If we need to compile the examples
|
|
|
|
IF (COMPILE_EXAMPLES)
|
|
|
|
add_subdirectory(examples/fallingcubes)
|
|
|
|
ENDIF (COMPILE_EXAMPLES)
|