-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
79 lines (61 loc) · 1.86 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
cmake_minimum_required (VERSION 2.6)
project(AssemblyControl)
set(EXECUTABLE_OUTPUT_PATH ../bin)
if(APPLE)
set(VREP_CFLAGS "-DNON_MATLAB_PARSING -DMAX_EXT_API_CONNECTIONS=255 -D__APPLE__")
elseif(UNIX)
set(VREP_CFLAGS "-DNON_MATLAB_PARSING -DMAX_EXT_API_CONNECTIONS=255 -D__linux")
elseif(WIN32)
set(VREP_CFLAGS "-DNON_MATLAB_PARSING -DMAX_EXT_API_CONNECTIONS=255 -D_WIN32")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VREP_CFLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${VREP_CFLAGS} -fPIC")
find_package( Threads )
# Library
file(
GLOB_RECURSE
lib_source_files
src/lib/*
src/lib/vrep/*
)
add_library(simulator ${lib_source_files})
target_link_libraries(simulator ${CMAKE_THREAD_LIBS_INIT})
include_directories(src/lib)
include_directories(src/lib/vrep)
# Applications
file(
GLOB_RECURSE
application_source_files
src/application/simulator/*
)
file(
GLOB_RECURSE
simple_application_source_files
src/application/simple_simulator/*
)
add_executable(assembly_control ${application_source_files})
target_link_libraries(assembly_control simulator)
add_executable(simple_assembly_control ${simple_application_source_files})
target_link_libraries(simple_assembly_control simulator)
# Examples
file(
GLOB_RECURSE
example_source_files
src/example/simulator/*
)
file(
GLOB_RECURSE
simple_example_source_files
src/example/simple_simulator/*
)
file(
GLOB_RECURSE
tasks_example_source_files
src/example/two_tasks/*
)
add_executable(example ${example_source_files})
target_link_libraries(example simulator)
add_executable(simple_example ${simple_example_source_files})
target_link_libraries(simple_example simulator)
add_executable(tasks_example ${tasks_example_source_files})
target_link_libraries(tasks_example simulator)