How can I make another library project that can be added to PackageName as a new component (without touching existing projects: for instance, I may want to allow third party contributors to add component to an existing package)?
I just see a similar question to which you seem to give the opposite answer: Using the same namespace for multiple independant projects - #2 by ben.boeckel
Can you clarify?
Or how can I edit local PackageName’s configuration file to declare the new components (ideally directly from the new library cmake project)?
Not sure I understand where the opposite answer is provided. There’s no rule about NAMESPACE needing to be unique. However, there’s also nothing that makes a single project understand everything that does share a NAMESPACE.
The config file could have something like:
foreach (component IN LISTS other_components)
find_package("project_${component}" QUIET)
if (found)
set(project_${component}_FOUND 1)
else ()
set(project_${component}_FOUND 0)
endif ()
endforeach ()