<div dir="ltr"><div>Hello,</div><div><br></div><div>I have found a reasonable workaround, override the call to fixup_bundle_item (called by fixup_bundle) and mark the file as writable:</div><div><br></div><div><div><font face="monospace, monospace">install(CODE "</font></div><div><font face="monospace, monospace">    INCLUDE (BundleUtilities)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">    macro (fixup_bundle_item resolved_embedded_item exepath dirs)</font></div><div><font face="monospace, monospace">        message (\"Making writable: \${resolved_embedded_item}\")</font></div><div><font face="monospace, monospace">        execute_process (COMMAND chmod +w \${resolved_embedded_item})</font></div><div><font face="monospace, monospace">        _fixup_bundle_item (\${resolved_embedded_item} \${exepath} \${dirs})</font></div><div><font face="monospace, monospace">    endmacro()</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">    COPY_AND_FIXUP_BUNDLE (${CMAKE_INSTALL_PREFIX}/test.app ${CMAKE_INSTALL_PREFIX}/test2.app \"\" \"${LIBRARY_DIRECTORIES}\")</font></div><div><font face="monospace, monospace">    "</font></div><div><font face="monospace, monospace">    COMPONENT Runtime )</font></div></div><div><br></div>Hope this helps any future readers.<div><br></div><div>Thanks,</div><div>Neil<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 2, 2017 at 11:12 AM, Neil Williams <span dir="ltr"><<a href="mailto:neewill+cmake@gmail.com" target="_blank">neewill+cmake@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>We use perforce for our source control system, which has a typical configuration where files need to be explicitly checked out prior to them being changed. If they are not checked the files are marked as read only.</div><div><br></div><div>When trying to use fixup_bundle with a dylib in the perforce depot it fails, as it copies the files from the source location into the .app bundle and preserves the read-only flag, so the call to install_name_tool fails.</div><div><br></div><div>Using Cmake 2.8.11.2.</div><div><br></div><div>Should this be considered a cmake bug?</div><div><br></div><div>Any ideas/suggestions in the short term for a workaround?</div><div><br></div><div>Thanks,</div><div>Neil</div></div>
</blockquote></div><br></div></div></div>