-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
executable file
·80 lines (65 loc) · 1.62 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
80
cmake_minimum_required(VERSION 2.8.3)
project(roshubd)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES vapor_master
# CATKIN_DEPENDS std_msgs
# DEPENDS nodejs
)
################################################
## Declare ROS messages, services and actions ##
################################################
## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )
#catkin_package(
# INCLUDE_DIRS include
# LIBRARIES roshub_manager
# CATKIN_DEPENDS actionlib actionlib_msgs message_generation roscpp std_msgs
# DEPENDS system_lib
#)
###########
## Build ##
###########
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
# build node packages
execute_process(
COMMAND npm i --cwd ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(
COMMAND npm run --cwd ${CMAKE_CURRENT_SOURCE_DIR} prepare
)
execute_process(
COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/node_modules/
)
execute_process(
COMMAND npm i --cwd ${CMAKE_CURRENT_SOURCE_DIR} --production
)
# install node packages & other scripts
install(
PROGRAMS bin/roshubd
DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(PROGRAMS package.json
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY dist/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/dist
)
install(DIRECTORY src/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/src
)
install(DIRECTORY node_modules
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)