I can of course do this by making the exclude statement not apply to the RUNTIME category, but then I’d also need to add a switch to AND that against as in my lib only projects I still wouldn’t want the runtimes to be installed, only on projects that feature executables. I already use a technique in which any projects that are not the top-level project automatically have EXCLUDE_FROM_ALL appended to their calls to install(.), which has worked great for static builds, but now for shared builds I need to somehow specifically allow the runtime dependencies through. I’m in a similar situation where I use FetchContent as much as possible and thus simply installing the targets within the build tree would result in everything pouring in to the install directory, most of which I don’t want. I appologize for the dig, but I was wondering if in the end you just ended up sticking with the file(GET_RUNTIME_DEPENDENCIES approach in the end. So for example look for all shared targets and then only execute install(target …) commands found for these targets and ignore everything else? 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.Ĭouldn’t cmake provide an option to automatically install shared target dependencies. 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. The libraries often have all their install stuff in one directory. At least they are not installed neither is there an error message.ĭirectory based Ignoring, no matter if build in or manual, would probably not helper either. It searches for Qt6 and also installs that sucessfully, but it doesn’t search for all linked libraries, which came via FetchContent. Shouldn’t this be able to find my shared dependencies? Or at least try to find them. POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"įRAMEWORK DESTINATION Beans.app/Contents/Frameworks I though maybe using “RUNTIME_DEPENDENCIES” would help with this, but for some reasons it doesn’t. But then shared libraries are missing for instance. Hmm my own install target has a component, so I could just install that target.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |