-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
59 lines (51 loc) · 2.3 KB
/
CMakeLists.txt
File metadata and controls
59 lines (51 loc) · 2.3 KB
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
cmake_minimum_required(VERSION 3.11)
project(UMAA_Repository)
# Check if CONNEXTDDS_ARCH is set
if(NOT DEFINED CONNEXTDDS_ARCH AND NOT DEFINED ENV{CONNEXTDDS_ARCH})
message(FATAL_ERROR
"========================================================================"
"\nERROR: CONNEXTDDS_ARCH is not set."
"\n========================================================================"
"\nHelper scripts to set the environment are included in the Connext"
"installation directory, typically found at:"
"\n <install_dir>/resource/scripts/rtisetenv_<target>.bash"
"\nExamples:"
"\n source /opt/rti_connext_dds-6.1.2/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash"
"\n source /opt/rti_connext_dds-7.3.0/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash"
"\nOr set it manually:"
"\n export CONNEXTDDS_ARCH=x64Linux4gcc7.3.0"
"\n cmake .. -DCONNEXTDDS_ARCH=x64Linux4gcc7.3.0"
"\n========================================================================"
)
endif()
# Get the architecture (from environment or CMake variable)
if(NOT CONNEXTDDS_ARCH)
set(CONNEXTDDS_ARCH $ENV{CONNEXTDDS_ARCH})
endif()
message(STATUS "========================================================================")
message(STATUS "RTI Connext DDS Target Architecture: ${CONNEXTDDS_ARCH}")
message(STATUS "========================================================================")
# Add folder where FindRTIConnextDDS.cmake file is to CMAKE_MODULE_PATH
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/rticonnextdds-cmake-utils/cmake/Modules"
)
# Find RTI Connext DDS
find_package(RTIConnextDDS
"6.1.2"
REQUIRED
COMPONENTS
core
)
# Build datamodel first
add_subdirectory(datamodel)
# Build examples
add_subdirectory(examples/xml-app-framework)
add_subdirectory(examples/service-template-wrappers)
message(STATUS "==================================================")
message(STATUS "UMAA Repository Build Configuration")
message(STATUS "==================================================")
message(STATUS "Datamodel: Built as umaa_types library")
message(STATUS "Examples:")
message(STATUS " - xml-app-framework")
message(STATUS " - service-template-wrappers")
message(STATUS "==================================================")