[CMake] fixup_bundle fails for read-only .dylib files
Neil Williams
neewill+cmake at gmail.com
Fri Feb 3 06:23:57 EST 2017
Hello,
I have found a reasonable workaround, override the call to
fixup_bundle_item (called by fixup_bundle) and mark the file as writable:
install(CODE "
INCLUDE (BundleUtilities)
macro (fixup_bundle_item resolved_embedded_item exepath dirs)
message (\"Making writable: \${resolved_embedded_item}\")
execute_process (COMMAND chmod +w \${resolved_embedded_item})
_fixup_bundle_item (\${resolved_embedded_item} \${exepath} \${dirs})
endmacro()
COPY_AND_FIXUP_BUNDLE (${CMAKE_INSTALL_PREFIX}/test.app
${CMAKE_INSTALL_PREFIX}/test2.app \"\" \"${LIBRARY_DIRECTORIES}\")
"
COMPONENT Runtime )
Hope this helps any future readers.
Thanks,
Neil
On Thu, Feb 2, 2017 at 11:12 AM, Neil Williams <neewill+cmake at gmail.com>
wrote:
> Hello,
>
> 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.
>
> 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.
>
> Using Cmake 2.8.11.2.
>
> Should this be considered a cmake bug?
>
> Any ideas/suggestions in the short term for a workaround?
>
> Thanks,
> Neil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170203/27afb133/attachment.html>
More information about the CMake
mailing list