Permalink
Browse files

Added CMake build script.

  • Loading branch information...
philiptaylor committed Sep 3, 2010
1 parent 0c18f01 commit 100835ba5e58118fd54ae7175f59896f260d2935
Showing with 68 additions and 0 deletions.
  1. +10 −0 README
  2. +58 −0 build/CMakeLists.txt
View
10 README
@@ -55,6 +55,16 @@ studio 8 professional. They may also work with Express edition, but
I've not tested that.
+Building with CMake on Linux
+----------------------------
+
+The code can be built on Linux (and possibly on other platforms)
+using CMake:
+
+ cd build
+ cmake .
+ make
+
Documentation
-------------
View
@@ -0,0 +1,58 @@
+cmake_minimum_required(VERSION 2.6)
+project(AI4G)
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../lib)
+set(SRC ../src)
+
+find_package(GLUT REQUIRED)
+
+include_directories(../include ${GLUT_INCLUDE_DIR} ${GL_INCLUDE_DIR})
+
+add_library(aicore STATIC
+ ${SRC}/action.cpp
+ ${SRC}/aimath.cpp
+ ${SRC}/basesm.cpp
+ ${SRC}/core.cpp
+ ${SRC}/dectree.cpp
+ ${SRC}/kinematic.cpp
+ ${SRC}/learning.cpp
+ ${SRC}/location.cpp
+ ${SRC}/markovsm.cpp
+ ${SRC}/qlearning.cpp
+ ${SRC}/rules.cpp
+ ${SRC}/sm.cpp
+ ${SRC}/steering.cpp
+ ${SRC}/steerpipe.cpp
+ ${SRC}/timing.cpp
+ ${SRC}/demos/common/gl/app.cpp
+ ${SRC}/demos/common/gl/main.cpp
+)
+
+set(DEMO_DEPS aicore ${GLUT_LIBRARY} ${OPENGL_LIBRARY})
+
+add_executable(c03_flocking ${SRC}/demos/c03_flocking/flocking_demo.cpp ${SRC}/demos/c03_flocking/flock_steer.cpp)
+add_executable(c03_kinematic ${SRC}/demos/c03_kinematic/kinematic_demo.cpp)
+add_executable(c03_pipeline ${SRC}/demos/c03_pipeline/pipeline_demo.cpp)
+add_executable(c03_priority ${SRC}/demos/c03_priority/priority_demo.cpp)
+add_executable(c03_steering ${SRC}/demos/c03_steering/steering_demo.cpp)
+add_executable(c05_action ${SRC}/demos/c05_action/action_demo.cpp)
+add_executable(c05_dectree ${SRC}/demos/c05_dectree/dectree_demo.cpp)
+add_executable(c05_hsm ${SRC}/demos/c05_hsm/hsm_demo.cpp)
+add_executable(c05_markovsm ${SRC}/demos/c05_markovsm/markovsm_demo.cpp)
+add_executable(c05_randectree ${SRC}/demos/c05_randectree/randectree_demo.cpp)
+add_executable(c05_sm ${SRC}/demos/c05_sm/sm_demo.cpp)
+add_executable(c07_simpleq ${SRC}/demos/c07_simpleq/simpleq_demo.cpp)
+
+target_link_libraries(c03_flocking ${DEMO_DEPS})
+target_link_libraries(c03_kinematic ${DEMO_DEPS})
+target_link_libraries(c03_pipeline ${DEMO_DEPS})
+target_link_libraries(c03_priority ${DEMO_DEPS})
+target_link_libraries(c03_steering ${DEMO_DEPS})
+target_link_libraries(c05_action ${DEMO_DEPS})
+target_link_libraries(c05_dectree ${DEMO_DEPS})
+target_link_libraries(c05_hsm ${DEMO_DEPS})
+target_link_libraries(c05_markovsm ${DEMO_DEPS})
+target_link_libraries(c05_randectree ${DEMO_DEPS})
+target_link_libraries(c05_sm ${DEMO_DEPS})
+target_link_libraries(c07_simpleq ${DEMO_DEPS})

0 comments on commit 100835b

Please sign in to comment.