-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
86 lines (74 loc) · 2.51 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
81
82
83
84
85
86
cmake_minimum_required(VERSION 3.15.0)
# Extract package name and version
find_package(ros_industrial_cmake_boilerplate REQUIRED)
extract_package_metadata(pkg)
project(${pkg_extracted_name} VERSION ${pkg_extracted_version} LANGUAGES C CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Determine Ubuntu release
find_program(LSB_RELEASE_EXEC lsb_release)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs OUTPUT_VARIABLE LSB_RELEASE_CODE_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
option(BUILD_RENDERING "Build the rendering module" ON)
option(BUILD_STUDIO "Build the studio module" ON)
set(PROJECT_TARGETS)
add_subdirectory(common)
add_subdirectory(acm)
add_subdirectory(collision)
add_subdirectory(command_language)
add_subdirectory(joint_state_slider)
add_subdirectory(kinematic_groups)
add_subdirectory(scene_graph)
add_subdirectory(environment)
add_subdirectory(plot)
add_subdirectory(joint_trajectory)
add_subdirectory(tool_path)
add_subdirectory(manipulation)
add_subdirectory(srdf)
add_subdirectory(planning)
add_subdirectory(workbench)
set(DEPS
"Qt5 COMPONENTS Core Gui Widgets Svg OpenGL Xml"
"Boost COMPONENTS program_options"
"tesseract_collision REQUIRED COMPONENTS core"
"tesseract_kinematics REQUIRED COMPONENTS core opw"
"tesseract_task_composer REQUIRED COMPONENTS core planning"
tesseract_environment
tesseract_scene_graph
tesseract_common
tesseract_urdf
tesseract_srdf
tesseract_visualization
tesseract_command_language)
if(${BUILD_RENDERING})
message("Building rendering module")
add_subdirectory(rendering)
if((EXISTS LSB_RELEASE_CODE_SHORT) AND (LSB_RELEASE_CODE_SHORT STREQUAL "noble"))
set(GZ-RENDERING gz-rendering8)
else()
set(GZ-RENDERING gz-rendering7)
endif()
list(
APPEND
DEPS
${GZ_RENDERING}
gz-math7-eigen3
"gz-common5 COMPONENTS profiler events av")
endif()
if(${BUILD_STUDIO} AND ${BUILD_RENDERING})
message("Building studio module")
list(APPEND DEPS "qtadvanceddocking NAMES qtadvanceddocking qt5advanceddocking qt6advanceddocking")
add_subdirectory(studio)
endif()
install(FILES "${CMAKE_CURRENT_LIST_DIR}/cmake/FindQwt.cmake" "${CMAKE_CURRENT_LIST_DIR}/cmake/FindGraphviz.cmake"
DESTINATION lib/cmake/${PROJECT_NAME})
configure_package(
SKIP_INSTALL_TARGETS
NAMESPACE tesseract
TARGETS ${PROJECT_TARGETS}
DEPENDENCIES ${DEPS}
CFG_EXTRAS cmake/tesseract_qt-extras.cmake)