File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,20 @@ endif()
46
46
find_package (fastdds REQUIRED)
47
47
get_target_property (FAST_INCLUDE_DIR fastdds INTERFACE_INCLUDE_DIRECTORIES )
48
48
49
+ # Default tweak to 0 in case the version is only X.Y or X.Y.Z
50
+ set (_fastdds_pro FALSE )
51
+
52
+ # If the version has a 4th component, capture it
53
+ if (DEFINED fastdds_VERSION AND
54
+ fastdds_VERSION MATCHES "^([0-9]+)\\ .([0-9]+)\\ .([0-9]+)\\ .(\\ d+)$" )
55
+ # CMAKE_MATCH_4 is the tweak component
56
+ set (_fastdds_tweak "${CMAKE_MATCH_4} " )
57
+ if (_fastdds_tweak GREATER 0)
58
+ set (_fastdds_pro TRUE )
59
+ endif ()
60
+ endif ()
61
+
62
+ message (STATUS "Found Fast DDS ${fastdds_VERSION} (tweak: ${_fastdds_tweak} )" )
49
63
message (STATUS "Fast DDS include directories: ${FAST_INCLUDE_DIR} " )
50
64
file (GLOB_RECURSE HPP_FILES "${FAST_INCLUDE_DIR} /fastdds/**/*.h*" )
51
65
Original file line number Diff line number Diff line change @@ -46,7 +46,12 @@ endif()
46
46
####################################################################################################
47
47
add_subdirectory (Examples/C++/DDSHelloWorld)
48
48
add_subdirectory (Examples/C++/RpcClientServerBasic)
49
- add_subdirectory (Examples/C++/RpcClientServerFeed)
49
+ # Add Pro features only when Fast DDS Pro is being used
50
+ if (_fastdds_pro)
51
+ add_subdirectory (Examples/C++/RpcClientServerFeed)
52
+ else ()
53
+ message (STATUS "Skipping RpcClientServerFeed example because Fast DDS Pro is not being used" )
54
+ endif ()
50
55
51
56
####################################################################################################
52
57
# Compile test applications
You can’t perform that action at this time.
0 commit comments