Skip to content

[cmake] Provide namespaced alias targets (PCL::<component>) in PCLConfig.cmake (#6397) - #6463

Merged
mvieth merged 2 commits into
PointCloudLibrary:masterfrom
kai-waang:cmake-namespace-alias-targets
Aug 18, 2026
Merged

[cmake] Provide namespaced alias targets (PCL::<component>) in PCLConfig.cmake (#6397)#6463
mvieth merged 2 commits into
PointCloudLibrary:masterfrom
kai-waang:cmake-namespace-alias-targets

Conversation

@kai-waang

Copy link
Copy Markdown
Contributor

As discussed in #6397, Downstream projects can now link e.g. PCL::common or PCL::geometry. An ALIAS of a non-global imported target requires CMake >= 3.18, so emulate it with an INTERFACE IMPORTED wrapper for older versions.

Downstream projects can now link e.g. PCL::common or PCL::geometry.
An ALIAS of a non-global imported target requires CMake >= 3.18, so
emulate it with an INTERFACE IMPORTED wrapper for older versions.

Fixes PointCloudLibrary#6397
@mvieth mvieth added changelog: enhancement Meta-information for changelog generation module: cmake labels Aug 16, 2026
@mvieth

mvieth commented Aug 16, 2026

Copy link
Copy Markdown
Member

Great, thanks! What do you think about also adding the following somewhere here:

add_library(PCL::PCL INTERFACE IMPORTED)
target_link_libraries(PCL::PCL INTERFACE ${PCL_COMPONENTS})

@kai-waang

Copy link
Copy Markdown
Contributor Author

I think that's a good idea. I've added it in a new commit.

@mvieth mvieth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@mvieth mvieth linked an issue Aug 18, 2026 that may be closed by this pull request
@mvieth
mvieth merged commit 1fdb038 into PointCloudLibrary:master Aug 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Meta-information for changelog generation module: cmake

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cmake] use PCL:: target for imported targets of PCL

2 participants