CMakeLists.txt 1.18 KB
Newer Older
Guillem Alenyà's avatar
Guillem Alenyà committed
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
# edit the following line to add all the source code files of the library
SET(sources segway_RMP400.cpp segway_RMP400_exception.cpp)
# edit the following line to add all the header files of the library
SET(headers segway_RMP400.h segway_RMP400_exception.h)

# edit the following line to find the necessary packages
FIND_PACKAGE(iriutils REQUIRED)
FIND_PACKAGE(comm REQUIRED)
FIND_PACKAGE(segway_rmp_200 REQUIRED)

# edit the following line to add the necessary include directories
INCLUDE_DIRECTORIES(.)
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${segway_rmp_200_INCLUDE_DIR})

ADD_LIBRARY(segway_rmp_400 SHARED ${sources})

#edit the following line to add the necessary system libraries (if any)
TARGET_LINK_LIBRARIES(segway_rmp_400 ${iriutils_LIBRARY})
TARGET_LINK_LIBRARIES(segway_rmp_400 ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(segway_rmp_400 ${segway_rmp_200_LIBRARY})

INSTALL(TARGETS segway_rmp_400
  RUNTIME DESTINATION bin
  LIBRARY DESTINATION lib/iridrivers
  ARCHIVE DESTINATION lib/iridrivers
)

INSTALL(FILES ${headers} DESTINATION include/iridrivers)

INSTALL(FILES ../Findsegway_rmp_400.cmake DESTINATION ${CMAKE_ROOT}/Modules/)