forked from Ramblurr/scriptbots
-
Notifications
You must be signed in to change notification settings - Fork 44
/
CMakeLists.txt
40 lines (33 loc) · 1.11 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
project(scriptbots)
cmake_minimum_required(VERSION 2.8)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
if (WIN32 AND NOT GLUT_FOUND)
find_library(GLUT_LIBRARY NAMES glut PATHS ${CMAKE_CURRENT_SOURCE_DIR})
find_library(GLUT32_LIBRARY NAMES glut32 PATHS ${CMAKE_CURRENT_SOURCE_DIR})
SET (LOCAL_GLUT32 1)
endif()
find_package(OpenMP)
if (OPENMP_FOUND)
SET (HAVE_OPENMP 1)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
set( SB_SRCS
View.cpp
GLView.cpp
main.cpp
DWRAONBrain.cpp
MLPBrain.cpp
AssemblyBrain.cpp
Agent.cpp
World.cpp
vmath.cpp )
add_executable(scriptbots ${SB_SRCS})
if (WIN32 AND NOT GLUT_FOUND)
target_link_libraries(scriptbots ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${GLUT32_LIBRARY})
else()
target_link_libraries(scriptbots ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
endif()