forked from FlexBE/flexbe_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (59 loc) · 1.81 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
cmake_minimum_required(VERSION 2.8.3)
project(flexbe_app)
find_package(catkin REQUIRED)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
#catkin_python_setup()
# specify catkin-specific information
# INCLUDE_DIRS - The exported include paths (i.e. cflags) for the package
# LIBRARIES - The exported libraries from the project
# CATKIN_DEPENDS - Other catkin projects that this project depends on
# DEPENDS - Non-catkin CMake projects that this project depends on
# CFG_EXTRAS - Additional configuration options
catkin_package(
INCLUDE_DIRS src
LIBRARIES ${PROJECT_NAME})
# use add_library() or add_executable() as required
#add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS})
#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/run_app
bin/shortcut
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()