-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathCMakeLists.txt
56 lines (47 loc) · 1.13 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
cmake_minimum_required(VERSION 3.0)
project(flexbe_app)
find_package(catkin REQUIRED)
catkin_package()
#add_custom_target(nwjs_inst)
#add_custom_command(TARGET nwjs_inst POST_BUILD COMMAND bin/nwjs_install)
add_custom_command(OUTPUT nwjs
COMMAND bin/nwjs_install
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
VERBATIM
)
add_custom_target(nw_install DEPENDS nwjs)
if(NOT ${CMAKE_CURRENT_SOURCE_DIR}/nwjs)
safe_execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/nwjs_install)
endif()
#############
## Install ##
#############
install(PROGRAMS
bin/nwjs_install
bin/run_app
bin/shortcut
bin/test_report
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES
package.json
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY
src
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY
nwjs
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# run tests
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest(launch/test_report.test)
endif()