CMakeLists.txt 1.69 KB
Newer Older
Sergi Hernandez's avatar
Sergi Hernandez committed
1
2
3
4
5
6
7
8
9
10
11
12
ADD_SUBDIRECTORY(xml)

# driver source files
SET(sources arm_control.cpp)
# application header files
SET(headers ../include/arm_control.h)
# locate the necessary dependencies
FIND_PACKAGE(iriutils REQUIRED)
FIND_PACKAGE(joystick REQUIRED)
FIND_PACKAGE(comm REQUIRED)
FIND_PACKAGE(dynamixel REQUIRED)
FIND_PACKAGE(dynamixel_motor_cont REQUIRED)
13
FIND_PACKAGE(bno055_imu_driver REQUIRED)
Sergi Hernandez's avatar
Sergi Hernandez committed
14
15
16
17
18
19
20
# add the necessary include directories
INCLUDE_DIRECTORIES(../include)
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${joystick_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${dynamixel_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${dynamixel_motor_cont_INCLUDE_DIR})
21
INCLUDE_DIRECTORIES(${bno055_imu_driver_INCLUDE_DIR})
Sergi Hernandez's avatar
Sergi Hernandez committed
22
23
24
25
26
27
28
29
30

SET_SOURCE_FILES_PROPERTIES(${XSD_SOURCES} PROPERTIES GENERATED 1)
# create the shared library
ADD_LIBRARY(arm_control SHARED ${sources} ${XSD_SOURCES})
TARGET_LINK_LIBRARIES(arm_control ${iriutils_LIBRARY})
TARGET_LINK_LIBRARIES(arm_control ${joystick_LIBRARY})
TARGET_LINK_LIBRARIES(arm_control ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(arm_control ${dynamixel_LIBRARY})
TARGET_LINK_LIBRARIES(arm_control ${dynamixel_motor_cont_LIBRARY})
31
TARGET_LINK_LIBRARIES(arm_control ${bno055_imu_driver_LIBRARY})
Sergi Hernandez's avatar
Sergi Hernandez committed
32
TARGET_LINK_LIBRARIES(arm_control ${XSD_LIBRARY})
Sergi Hernandez's avatar
Sergi Hernandez committed
33
#TARGET_LINK_LIBRARIES(arm_control libwiringPi.so)
Sergi Hernandez's avatar
Sergi Hernandez committed
34
35
36
37
38
39
40
41
42
43
44

ADD_DEPENDENCIES(arm_control xsd_files_gen)

# link necessary libraries
INSTALL(TARGETS arm_control
        RUNTIME DESTINATION bin
        LIBRARY DESTINATION lib/iridrivers
        ARCHIVE DESTINATION lib/iridrivers)
INSTALL(FILES ${headers} DESTINATION include/iridrivers)
INSTALL(FILES ../Findarm_control.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
ADD_SUBDIRECTORY(examples)