Skip to content

Commit

Permalink
Support new fastdds naming (#315)
Browse files Browse the repository at this point in the history
* Refs #19451. Support new fastdds naming

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #19451. Fix in swig cmake files

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored and EduPonz committed May 14, 2024
1 parent 88e9f39 commit 66c6ebd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion colcon.pkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fastddsgen",
"type": "gradle",
"test-dependencies" : ["fastrtps"]
"test-dependencies" : ["fastdds"]
}
8 changes: 3 additions & 5 deletions src/main/java/com/eprosima/fastdds/fastddsgen.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class fastddsgen
private static ArrayList<String> m_platforms = null;

private Vector<String> m_idlFiles;
protected static String m_appEnv = "FASTRTPSHOME";
protected static String m_appEnv = "FASTDDSHOME";
private String m_exampleOption = null;
private boolean m_ppDisable = false; //TODO
private boolean m_replace = false;
Expand All @@ -86,7 +86,7 @@ public class fastddsgen
private boolean m_publishercode = true;
private boolean m_subscribercode = true;
private boolean m_atLeastOneStructure = false;
protected static String m_localAppProduct = "fastrtps";
protected static String m_localAppProduct = "fastdds";
private ArrayList<String> m_includePaths = new ArrayList<String>();

// Mapping where the key holds the path to the template file and the value the wanted output file name
Expand Down Expand Up @@ -451,7 +451,7 @@ public boolean execute()
}

// Add product library
solution.addLibrary("fastrtps");
solution.addLibrary("fastdds");

for (int count = 0; returnedValue && (count < m_idlFiles.size()); ++count)
{
Expand Down Expand Up @@ -528,8 +528,6 @@ private String getVersion()
{
try
{
//InputStream input = this.getClass().getResourceAsStream("/fastrtps_version.h");

InputStream input = this.getClass().getClassLoader().getResourceAsStream("version");
byte[] b = new byte[input.available()];
input.read(b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $endif$

# Find requirements
find_package(fastcdr REQUIRED)
find_package(fastrtps 2.12 REQUIRED)
find_package(fastdds 3 REQUIRED)

$solution.projects : { project | $pub_sub_execs(project=project, libraries=solution.libraries, test=test)$}; separator="\n"$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message(STATUS "Configuring python wrapper for types in $project.name$...")
project($project.name$)

find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastdds 3 REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

Expand All @@ -64,7 +64,7 @@ target_include_directories(\${PROJECT_NAME} PUBLIC
target_link_libraries(\${PROJECT_NAME}
PUBLIC
fastcdr
fastrtps
fastdds
$project.dependencies : { dep | $dep$}; separator=" "$
)

Expand Down Expand Up @@ -110,7 +110,7 @@ endif()

target_link_libraries(\${\${PROJECT_NAME}_MODULE}
Python3::Module
fastrtps
fastdds
\${PROJECT_NAME}
)

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/eprosima/fastdds/solution/Solution.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ArrayList<String> getLibraries()

for(int count = 0; count < libraries.size(); ++count)
{
if(m_example.contains("Win") && libraries.get(count).startsWith("fastrtps"))
if(m_example.contains("Win") && libraries.get(count).startsWith("fastdds"))
ret.add(libraries.get(count) + "-" + m_version);
else
ret.add(libraries.get(count));
Expand All @@ -65,7 +65,7 @@ public ArrayList<String> getLibrariesDebug()

for(int count = 0; count < libraries.size(); ++count)
{
if(m_example.contains("Win") && libraries.get(count).startsWith("fastrtps"))
if(m_example.contains("Win") && libraries.get(count).startsWith("fastdds"))
ret.add(libraries.get(count) + "d-" + m_version);
else
ret.add(libraries.get(count) + "d");
Expand All @@ -83,7 +83,7 @@ public ArrayList<String> getLibrariesStatic()
{
if(libraries.get(count).startsWith("ndds"))
ret.add(libraries.get(count) + "z");
else if(m_example.contains("Win") && libraries.get(count).startsWith("fastrtps"))
else if(m_example.contains("Win") && libraries.get(count).startsWith("fastdds"))
ret.add("lib" + libraries.get(count) + "-" + m_version);
else
ret.add("lib" + libraries.get(count));
Expand All @@ -101,7 +101,7 @@ public ArrayList<String> getLibrariesStaticDebug()
{
if(libraries.get(count).startsWith("ndds"))
ret.add(libraries.get(count) + "zd");
else if(m_example.contains("Win") && libraries.get(count).startsWith("fastrtps"))
else if(m_example.contains("Win") && libraries.get(count).startsWith("fastdds"))
ret.add("lib" + libraries.get(count) + "d-" + m_version);
else
ret.add("lib" + libraries.get(count) + "d");
Expand Down

0 comments on commit 66c6ebd

Please sign in to comment.