forked from mjhmilla/pendulumRbdlMuscod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·52 lines (40 loc) · 1.41 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
CMAKE_MINIMUM_REQUIRED ( VERSION 2.6 )
PROJECT( "pendulum" CXX C )
LIST( APPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/CMake
${PROJECT_SOURCE_DIR}/CMake/Modules
)
SET(CUSTOM_RBDL_PATH "" CACHE PATH "Path to specific RBDL Installation")
INCLUDE( SimOptDefaults )
FIND_PACKAGE( MUSCOD REQUIRED ) # find and include "MUSCODConfig.cmake"
IF( MUSCOD_FOUND )
INCLUDE( ${MUSCOD_USE_FILE} )
ENDIF( MUSCOD_FOUND )
FIND_PACKAGE ( PGPLOT REQUIRED )
FIND_PACKAGE ( RBDL REQUIRED LUAMODEL REQUIRED)
FIND_PACKAGE (Lua51 REQUIRED)
FIND_PACKAGE ( Eigen3 3.0.0 )
INCLUDE_DIRECTORIES ( ${RBDL_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIR} )
ADD_LIBRARY ( pendulum
SRC/pendulum.cc
SRC/PendulumModel.cpp
SRC/csvtools.cc
)
TARGET_LINK_LIBRARIES ( pendulum
${RBDL_LIBRARY}
${RBDL_LUAMODEL_LIBRARY}
${LUA_LIBRARIES}
${PGPLOT_CPGPLOT_LIBRARY}
${PGPLOT_PGPLOT_LIBRARY}
)
message("CUSTOM_RBDL_PATH :" ${CUSTOM_RBDL_PATH})
message("RBDL_INCLUDE_DIR :" ${RBDL_INCLUDE_DIR})
message("RBDL_LIBRARY :" ${RBDL_LIBRARY})
message("RBDL_LUAMODEL_LIBRARY :" ${RBDL_LUAMODEL_LIBRARY})
message("LUA_LIBRARIES :" ${LUA_LIBRARIES})
message("EIGEN3_INCLUDE_DIR :" ${EIGEN3_INCLUDE_DIR})
EXECUTE_PROCESS(COMMAND mkdir -p ./RES)
EXECUTE_PROCESS(COMMAND ln -s -f ${PROJECT_SOURCE_DIR}/SRC)
EXECUTE_PROCESS(COMMAND ln -s -f ${PROJECT_SOURCE_DIR}/DAT)
EXECUTE_PROCESS(COMMAND ln -s -f ${PROJECT_SOURCE_DIR}/default.plot)