-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
44 lines (36 loc) · 1.09 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
#
# Development of this module has been funded by the Monterey Bay Aquarium
# Research Institute (MBARI) and the David and Lucile Packard Foundation
#
cmake_minimum_required(VERSION 3.5)
project(lrauv_description)
include(CTest)
#============================================================================
# Hooks
configure_file(
"hooks/hook.dsv.in"
"${CMAKE_CURRENT_BINARY_DIR}/hooks/hook.dsv" @ONLY
)
configure_file(
"hooks/hook.sh.in"
"${CMAKE_CURRENT_BINARY_DIR}/hooks/hook.sh" @ONLY
)
#============================================================================
# Model Generation
add_custom_command(
OUTPUT modelsdf
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/description_generator.py
${CMAKE_CURRENT_SOURCE_DIR}/models/tethys/model.sdf.in
${CMAKE_CURRENT_BINARY_DIR}/models/tethys/model.sdf
)
add_custom_target(generate_model ALL
DEPENDS modelsdf
)
install(DIRECTORY
models
${CMAKE_CURRENT_BINARY_DIR}/hooks
DESTINATION share/${PROJECT_NAME})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/models/tethys/model.sdf
DESTINATION share/${PROJECT_NAME}/models/tethys
)