<div dir="ltr">I have a cmake setup that uses symlinks to place resource files/directories/libraries relative to several different subcomponents during the build process. This avoids excessive copying, and makes it easier to build / test individual components. Something like this (*'s as symlinks):<div>   /build/componentA/</div><div>         /componentA.app</div><div><div>         /HelpFiles*    </div><div>   /build/componentB/</div><div>        /HelpFiles*</div><div>        /componentB.app</div><div>                /Contents/Resources/componentA.app*</div><div><br></div><div>During the install stage, I'm assembling all of the subcomponents into an .app package (on mac, at least), and obviously need the symlinks to be turned into copies. This is proving to be tricky.... The symlinks are copied over to the install folder as I install each component, so later steps to install hard-copies of those files fails, as they collide with existing symlinks. Explicitly deleting those symlinks in the install folder doesn't seem like an option - the locations/names come from generator expressions, which can't easily be expanded in a post-install "install(CODE ...)" command, for example.</div><div><br></div><div>It's not difficult to simple provide a fixed list of symlinks to replace with copies, glob-and-replace ALL symlinks with copies, or just do the symlink swap with a shell script - but none of those feel like good solutions. I don't want to resolve symlinks that shouldn't be resolved, and I don't want to maintain a global list of symlinks to resolve (that has to be updated if a component is added or moved).</div></div><div><br></div><div>Any advice on how to do this in a proper CMAKE way? Or - any strategies I can use to avoid some of the excess copying? </div><div><br></div><div>Thanks much</div><div>Scott C</div></div>