MantisBT - CMake
View Issue Details
0013600CMakeCMakepublic2012-10-23 06:562013-04-17 08:54
Tobias Hieta 
David Cole 
normalminoralways
closedfixed 
DarwinMacOSX10.8.2
CMake 2.8.9 
CMake 2.8.11CMake 2.8.11 
0013600: fixup_bundle doesn't copy Sparkle.framework
After quite a bit of debugging I realized that fixup_bundle has a regexp that matches Frameworks in order to resolve embedded item. This didn't work properly for me. Before I made the change the following was given when fixup bundle was executed (I changed show_status=1 in fixup_bundle to see it)

-- 8/66: copying '/path/Dependencies/932bede-darwin-i686/Frameworks/Sparkle.framework/Sparkle'
-- key='Sparkle'
-- item='/path/Dependencies/932bede-darwin-i686/Frameworks/Sparkle.framework/Sparkle'
-- resolved_item='/path/Dependencies/932bede-darwin-i686/Frameworks/Sparkle.framework/Sparkle'
-- default_embedded_path='@executable_path/../Frameworks'
-- embedded_item='/path/Dependencies/932bede-darwin-i686/Frameworks/Sparkle.framework/Sparkle'
-- resolved_embedded_item='/path/Dependencies/932bede-darwin-i686/Frameworks/Sparkle.framework/Sparkle'
-- copyflag='1'

This resulted in a warning that resolved_item == resolved_embedded_item and that it wouldn't be copied.

The error turns out to be the following line in BundleUtilities.cmake

string(REGEX REPLACE "^.*(${item_name}.framework/.*/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")

I changed it to

string(REGEX REPLACE "^.*(${item_name}.framework/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")

to get it to work.

I am not sure if this is just because of the Sparkle framework layout, but looking at other frameworks it seems quite normal to have Name.framework/Name as the path to the library.
No tags attached.
Issue History
2012-10-23 06:56Tobias HietaNew Issue
2012-10-23 07:05David ColeAssigned To => David Cole
2012-10-23 07:05David ColeStatusnew => assigned
2012-10-23 07:15David ColeNote Added: 0031291
2012-10-23 07:16David ColeNote Edited: 0031291bug_revision_view_page.php?bugnote_id=31291#r863
2012-10-23 07:26Tobias HietaNote Added: 0031292
2012-10-23 18:34David ColeNote Added: 0031300
2012-10-23 18:35David ColeTarget Version => CMake 2.8.11
2012-11-01 17:56David ColeNote Added: 0031378
2012-11-01 17:56David ColeStatusassigned => resolved
2012-11-01 17:56David ColeFixed in Version => CMake 2.8.11
2012-11-01 17:56David ColeResolutionopen => fixed
2013-04-17 08:54Robert MaynardNote Added: 0032859
2013-04-17 08:54Robert MaynardStatusresolved => closed

Notes
(0031291)
David Cole   
2012-10-23 07:15   
(edited on: 2012-10-23 07:16)
Rather than removing the ".*/" before item_name, keep it in, but make the / optional with a ? like this:

  "^.*(${item_name}.framework/.*/?${item_name}).*$"

In the typical framework layout, the file at the root level of the framework like that is just a symlink to the real library file down in a versioned subfolder. Hence, the extra ".*/" to allow for the subfolder name.

We can't change CMake to the REGEX you have suggested, or it will stop working for those frameworks (which are by far more common if you analyze the frameworks installed in /System/Library/Frameworks)

Let me know if simply adding the single "?" works for you. If so, we can get a fix like that into CMake for the 2.8.11 release.

(0031292)
Tobias Hieta   
2012-10-23 07:26   
Thanks for looking into this David,

Yes adding that ? works just fine.
(0031300)
David Cole   
2012-10-23 18:34   
I've pushed this fix as a topic branch to the CMake stage repo, and will merge it to 'next' in the next couple of weeks after we're done with the 2.8.10 release.

Thanks.
(0031378)
David Cole   
2012-11-01 17:56   
Fix pushed to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89256e0 [^]

You can try a nightly build of CMake for now if you need the fix before the 2.8.11 release.
(0032859)
Robert Maynard   
2013-04-17 08:54   
Closing resolved issues that have not been updated in more than 4 months.