Skip to content

Commit eeb3ebe

Browse files
committed
Updated build for OpenDDS to use CMake and this repo's IDL file
1 parent 3d0209a commit eeb3ebe

File tree

3 files changed

+22
-27
lines changed

3 files changed

+22
-27
lines changed

srcCxx/opendds-cmake/CMakeLists.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 3.12)
2+
project(opendds_shape_main CXX)
3+
4+
find_package(OpenDDS REQUIRED)
5+
6+
add_executable(shape_main
7+
../shape_main.cxx
8+
)
9+
10+
target_compile_definitions(shape_main
11+
PRIVATE OPENDDS
12+
)
13+
14+
opendds_target_sources(shape_main
15+
../shape.idl
16+
OPENDDS_IDL_OPTIONS --no-default-nested
17+
)
18+
19+
target_link_libraries(shape_main OpenDDS::Rtps_Udp)

srcCxx/opendds_shape_main.mpc

-18
This file was deleted.

srcCxx/shape_configurator_opendds.h

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "GeneratedCode/ShapeTypeTypeSupportImpl.h"
1+
#include "shapeTypeSupportImpl.h"
22

33
#include "dds/DCPS/Marked_Default_Qos.h"
44
#include "dds/DCPS/Service_Participant.h"
@@ -11,19 +11,13 @@
1111

1212
#define OBTAIN_DOMAIN_PARTICIPANT_FACTORY TheParticipantFactory
1313
#define LISTENER_STATUS_MASK_ALL OpenDDS::DCPS::ALL_STATUS_MASK
14-
#define REGISTER_TYPE org::omg::dds::demo::ShapeTypeTypeSupport_var ts = \
15-
new org::omg::dds::demo::ShapeTypeTypeSupportImpl; ts->register_type
14+
#define REGISTER_TYPE ShapeTypeTypeSupport_var ts = \
15+
new ShapeTypeTypeSupportImpl; ts->register_type
1616
#define CONFIGURE_PARTICIPANT_FACTORY configure_rtps();
1717
#define STRING_IN .in()
1818
#define STRING_INOUT .inout()
1919
#define STRING_ALLOC(LHS, RHS) LHS = CORBA::string_alloc(RHS)
2020

21-
using org::omg::dds::demo::ShapeType;
22-
using org::omg::dds::demo::ShapeTypeSeq;
23-
using org::omg::dds::demo::ShapeTypeDataReader;
24-
using org::omg::dds::demo::ShapeTypeDataWriter;
25-
using org::omg::dds::demo::ShapeTypeTypeSupport;
26-
2721
const char* get_qos_policy_name(DDS::QosPolicyId_t policy_id)
2822
{
2923
switch (policy_id) {

0 commit comments

Comments
 (0)