Skip to content

Commit

Permalink
Enable HIDE_SYMBOLS_BY_DEFAULT
Browse files Browse the repository at this point in the history
Use GZ_ visibilty macro instead of custom _EXPORTS_API to fix problems on Linux
  • Loading branch information
j-rivero authored Nov 13, 2023
1 parent ac0c44f commit fbdc887
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/PointCloudUtil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fbdc887

Please sign in to comment.