Skip to content

Fixed some CMake issues#55

Merged
facontidavide merged 1 commit intofacontidavide:mainfrom
nobleo:improve-cmake-structure
Feb 21, 2026
Merged

Fixed some CMake issues#55
facontidavide merged 1 commit intofacontidavide:mainfrom
nobleo:improve-cmake-structure

Conversation

@alireza-moayyedi
Copy link
Contributor

Hi,

I wanted to use Cloudini in my project but not just the off the shelf topic converter node. I wanted to link directly against the libraries and use the available APIs in my source code. However, there were some issues that I had to fix:

  • pcl_ros has more exported dependencies than the system library PCL. And annoyingly, find_package(pcl_ros) overwrites exported dependencies that come with find_package(PCL). So if a downstream project (as in my case) is using only find_package(PCL) in their cmake then there will be target was not found errors for targets such as usblib::usblib. Since in any case only COMMON and IO components of the PCL are being used in Cloudini, I removed pcl_ros references to keep it more lightweight and avoid unnecessary dependencies in downstream packages (although this is more of pcl_ros overwriting issue, but well, thought it would be better in any case to keep things efficient).
  • Fixed cloudini_ros targets not being exported
    • ament_export_dependencies expects full package name so had to replace ${PLUGIN_DEPS} (as it includes targets) with the package names.

Some furthur improvements:

  • PCL already exports its libraries as targets so things like ${PCL_INCLUDE_DIRS} are no more necessary
  • Similarly, ament_export_include_directories or ament_export_libraries are also unnecessary as cloudini_ros now already exports targets.

facontidavide added a commit that referenced this pull request Feb 21, 2026
…xports

- Use find_package(PCL COMPONENTS common io) instead of pcl_ros
- Link against PCL_COMMON_LIBRARIES/PCL_IO_LIBRARIES instead of PCL_LIBRARIES
- Fix ament_export_targets with EXPORT for proper downstream consumption
- Update package.xml deps: libpcl-common + libpcl-io replace pcl_ros
- Remove redundant PCL_INCLUDE_DIRS from target_include_directories

Based on improvements from PR #55.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@facontidavide facontidavide merged commit dbc8a6a into facontidavide:main Feb 21, 2026
2 of 4 checks passed
@facontidavide
Copy link
Owner

image

facontidavide added a commit that referenced this pull request Feb 21, 2026
…xports

- Use find_package(PCL COMPONENTS common io) instead of pcl_ros
- Link against PCL_COMMON_LIBRARIES/PCL_IO_LIBRARIES instead of PCL_LIBRARIES
- Fix ament_export_targets with EXPORT for proper downstream consumption
- Update package.xml deps: libpcl-common + libpcl-io replace pcl_ros
- Remove redundant PCL_INCLUDE_DIRS from target_include_directories

Based on improvements from PR #55.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants