-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
56 lines (42 loc) · 1.61 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 2.8.12)
project(argos3_examples)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
# Set the path where CMake will find additional scripts
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# Create compilation database (for autocomplete)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Find the ARGoS package
find_package(PkgConfig)
pkg_check_modules(ARGOS REQUIRED argos3_simulator)
set(ARGOS_PREFIX ${ARGOS_PREFIX} CACHE INTERNAL "")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ARGOS_PREFIX}/share/argos3/cmake)
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
# Check whether all the necessary libs have been installed to compile the
# code that depends on Qt and OpenGL
#include(ARGoSCheckQTOpenGL)
# Look for the (optional) galib library
# find_package(GALIB)
# if(GALIB_FOUND)
# include_directories(${GALIB_INCLUDE_DIRS})
# endif(GALIB_FOUND)
# Find Lua
find_package(Lua53 REQUIRED)
# Set ARGoS include dir
# Check whether all the necessary libs have been installed to compile the
# code that depends on Qt and OpenGL
#include(ARGoSCheckQTOpenGL)
# Set ARGoS include dir
set(INTERFACE_DIR interface)
set(CONTROLLER_DIR controllers)
include_directories(${CMAKE_SOURCE_DIR} ${ARGOS_INCLUDE_DIRS} ${GSL_INCLUDE_DIR} ${CONTROLLER_DIR} ${INTERFACE_DIR} ${LUA_INCLUDE_DIR})
# Set ARGoS link dir
link_directories(${ARGOS_LIBRARY_DIRS})
add_subdirectory(interface)
add_subdirectory(controllers)
add_subdirectory(loop_functions)