Hmm my own install target has a component, so I could just install that target. But then shared libraries are missing for instance.
I though maybe using “RUNTIME_DEPENDENCIES” would help with this, but for some reasons it doesn’t.
install(TARGETS BeansApp COMPONENT Beans
PRE_EXCLUDE_REGEXES "api-ms-" "ext-ms-"
FRAMEWORK DESTINATION Beans.app/Contents/Frameworks
Shouldn’t this be able to find my shared dependencies? Or at least try to find them. It searches for Qt6 and also installs that sucessfully, but it doesn’t search for all linked libraries, which came via FetchContent. At least they are not installed neither is there an error message.
Directory based Ignoring, no matter if build in or manual, would probably not helper either. The libraries often have all their install stuff in one directory. And they also don’t use Components.
I suppose the best way would be if they all use Components, but it would be insane to open Pull Requests for all the dependencies. Furthermore the Component name is free to choose, so even if they all specify components, it would be quite some work to figure out what components are needed exactly.
Couldn’t cmake provide an option to automatically install shared target dependencies. So for example look for all shared targets and then only execute install(target …) commands found for these targets and ignore everything else?