Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny Changes for Fast-DDS + Add version 2.3.3 #6429

Merged
merged 4 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipes/fast-dds/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ sources:
"2.3.2":
url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.2.tar.gz"
sha256: "4D8183CF4D37C3DE9E6FD28D2850DD08023A9079001C4880B23C95F0D8C0B5CE"
"2.3.3":
url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.3.tar.gz"
sha256: "5EBF27D810C6AB68EEF7D42937CD421D85E50509AE96883239979A1B3A2F4F82"
patches:
"2.3.2":
- base_path: "source_subfolder"
patch_file: "patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch"
"2.3.3":
- base_path: "source_subfolder"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what is here official process - 2.3.3 dont need patch - so i just gave the base_path but not the patch_file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, didn't know that works. Nice hack.

Anyway, the normal/official way is to don't add the version in patches and do the following in conanfile.py.

for patch in self.conan_data.get("patches", {}).get(self.version, []):
    tools.patch(**patch)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for info - but i found out i have to patch again - i was missing my checks inside container .... so it took tinyxml from system .... so still have to add patch. ^^'

patch_file: "patches/2.3.3-0001-fix-find-asio-and-tinyxml2.patch"
13 changes: 8 additions & 5 deletions recipes/fast-dds/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def package_info(self):
self.cpp_info.names["cmake_find_package"] = "fastdds"
self.cpp_info.names["cmake_find_multi_package"] = "fastdds"
# component fastrtps
self.cpp_info.components["fastrtps"].name = "fastrtps"
self.cpp_info.components["fastrtps"].names["cmake_find_package"] = "fastrtps"
self.cpp_info.components["fastrtps"].names["cmake_find_multi_package"] = "fastrtps"
self.cpp_info.components["fastrtps"].libs = tools.collect_libs(self)
self.cpp_info.components["fastrtps"].requires = [
"fast-cdr::fast-cdr",
Expand All @@ -197,13 +198,15 @@ def package_info(self):
self.cpp_info.components["fastrtps"].build_modules["cmake_find_package"] = [self._module_file_rel_path]
self.cpp_info.components["fastrtps"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path]
# component fast-discovery
self.cpp_info.components["fast-discovery"].name = "fast-discovery"
self.cpp_info.components["fast-discovery"].bindirs = ["bin"]
self.cpp_info.components["fast-discovery-server"].names["cmake_find_package"] = "fast-discovery-server"
self.cpp_info.components["fast-discovery-server"].names["cmake_find_multi_package"] = "fast-discovery-server"
self.cpp_info.components["fast-discovery-server"].bindirs = ["bin"]
bin_path = os.path.join(self.package_folder, "bin")
self.output.info("Appending PATH env var for fast-dds::fast-discovery with : {}".format(bin_path)),
self.output.info("Appending PATH env var for fast-dds::fast-discovery-server with : {}".format(bin_path)),
self.env_info.PATH.append(bin_path)
# component tools
self.cpp_info.components["tools"].name = "tools"
self.cpp_info.components["tools"].names["cmake_find_package"] = "tools"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name here is a little generic... maybe?

Suggested change
self.cpp_info.components["tools"].names["cmake_find_package"] = "tools"
self.cpp_info.components["fast-dds-tools"].names["cmake_find_package"] = "tools"

self.cpp_info.components["tools"].names["cmake_find_multi_package"] = "tools"
self.cpp_info.components["tools"].bindirs = [os.path.join("bin","tools")]
bin_path = os.path.join(self._pkg_bin, "tools")
self.output.info("Appending PATH env var for fast-dds::tools with : {}".format(bin_path)),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a9cb0209..400c681e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -225,8 +225,8 @@ if(NOT BUILD_SHARED_LIBS)
endif()

eprosima_find_package(fastcdr REQUIRED)
-eprosima_find_thirdparty(Asio asio VERSION 1.10.8)
-eprosima_find_thirdparty(TinyXML2 tinyxml2)
+eprosima_find_thirdparty(asio REQUIRED)
+eprosima_find_thirdparty(tinyxml2 REQUIRED)

find_package(foonathan_memory REQUIRED)
message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}")
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index d26915242..f00e36ea6 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -456,7 +456,7 @@ elseif(NOT EPROSIMA_INSTALLER)
# Link library to external libraries.
target_link_libraries(${PROJECT_NAME} ${PRIVACY} fastcdr foonathan_memory
${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}
- ${TINYXML2_LIBRARY}
+ tinyxml2::tinyxml2
$<$<BOOL:${LINK_SSL}>:OpenSSL::SSL$<SEMICOLON>OpenSSL::Crypto$<$<BOOL:${WIN32}>:$<SEMICOLON>crypt32.lib>>
$<$<BOOL:${WIN32}>:iphlpapi$<SEMICOLON>Shlwapi>
${THIRDPARTY_BOOST_LINK_LIBS}
2 changes: 2 additions & 0 deletions recipes/fast-dds/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"2.3.2":
folder: all
"2.3.3":
folder: all