From d28df727cf621ca9e952c2c28d5b2a659d678bba Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Fri, 3 Nov 2023 19:22:57 +0100 Subject: [PATCH 1/2] Use GZ_ visibilty macro instead of custom _EXPORTS_API Signed-off-by: Jose Luis Rivero --- src/PointCloudUtil.hh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/PointCloudUtil.hh b/src/PointCloudUtil.hh index ca4e30ae..12a95460 100644 --- a/src/PointCloudUtil.hh +++ b/src/PointCloudUtil.hh @@ -32,16 +32,6 @@ #include "gz/sensors/config.hh" #include "gz/sensors/Export.hh" -#ifndef _WIN32 -# define PointCloudUtil_EXPORTS_API -#else -# if (defined(DepthPoints_EXPORTS)) -# define PointCloudUtil_EXPORTS_API __declspec(dllexport) -# else -# define PointCloudUtil_EXPORTS_API __declspec(dllimport) -# endif -#endif - namespace gz { namespace sensors @@ -52,7 +42,7 @@ namespace gz /// \brief Helper class that fills a msgs::PointCloudPacked message using /// image and depth data. The RgbdCameraSensor and DepthCameraSensor /// class use this. - class PointCloudUtil_EXPORTS_API PointCloudUtil + class GZ_SENSORS_VISIBLE PointCloudUtil { /// \brief Fill a msgs::PointCloudPacked. /// \param[in,out] _msg Point cloud message to fill. This message From 1fc058a577d240d795b8892e293d9c7fe9ddf73e Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Mon, 6 Nov 2023 19:20:34 +0100 Subject: [PATCH 2/2] Enable the HIDE_SYMBOLS_BY_DEFAULT Signed-off-by: Jose Luis Rivero --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c82c166..58b97a12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,8 @@ find_package(Eigen3 REQUIRED) #============================================================================ # Configure the build #============================================================================ -gz_configure_build(QUIT_IF_BUILD_ERRORS) +gz_configure_build(QUIT_IF_BUILD_ERRORS + HIDE_SYMBOLS_BY_DEFAULT) #============================================================================ # Create package information