Do you get different results if you use CMake from git 'master' or 'next' ?? (Or CMake 2.8.2...?)<br><br>In 2.8.3, there was a change introduced that caused problems in *some* projects. I suspect your project is one of them.<br>
<br>This commit: <a href="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2895f48a4e79af49937b9e6a260076440b1a67a">http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2895f48a4e79af49937b9e6a260076440b1a67a</a><br>made a fix to BundleUtilities to cause a FATAL_ERROR if one of the fixed up libraries is not inside the bundle. (It is assumed that all libraries are either: in the bundle to start with, or copied in by fixup_bundle itself.<br>
<br>Read the commit comments carefully for all the gory details.<br><br>Suffice it to say:<br>- there was a bug fix made, and released in 2.8.3 ( <a href="http://public.kitware.com/Bug/view.php?id=10417">http://public.kitware.com/Bug/view.php?id=10417</a> )<br>
- it is backwards-incompatible for *some* previously successful users of fixup_bundle<br>- we will be keeping the change despite this one-time backwards incompatibility<br>- the above referenced commit (c2895f48) will help projects that suffer from this condition to identify any problem libraries in its prerequisites...<br>
<br>Hopefully.... (?) you are suffering from this problem, and simply using the new BundleUtilities will highlight where you may need additional install rules.<br><br>The bottom line is:<br>We used to copy in the libraries that you passed to us, even though they were outside the bundle. Now we expect the libraries that you are passing in for fixup are already inside the bundle, and that you should have install rules for them to be in there before calling fixup_bundle...<br>
<br>Sorry for the inconvenience.<br><br>Hope this answers it,<br>David<br><br><br><div class="gmail_quote">On Mon, Jan 10, 2011 at 6:24 PM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">And just to follow up a bit with something else, I added the following bit of cmake code for the 2 libraries MXADataModel and AIMLib:<br>
<br>
SET_TARGET_PROPERTIES(${targetName}<br>
PROPERTIES<br>
LINK_FLAGS "-current_version ${${CMP_PROJECT_NAME}_VERSION} -compatibility_version ${${CMP_PROJECT_NAME}_VERSION}"<br>
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"<br>
BUILD_WITH_INSTALL_RPATH 1<br>
)<br>
<br>
And now I can get everything to work. This seems like an odd thing to have to add. Why can't fixup_bundle() resolve an item that is in the build tree? Seems that I have to install the library FIRST to an external location with the proper install_name for that location then run my fixup_bundle(). I can't see the difference.<br>
<font color="#888888">--<br>
</font><div class="im">Mike Jackson <<a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a>><br>
<br>
</div><div><div></div><div class="h5">On Jan 10, 2011, at 6:12 PM, Michael Jackson wrote:<br>
<br>
> CMake 2.8.3, OS X 10.6.6, Makefiles<br>
><br>
> I am attempting to use fixup_bundle() to create my OS X app bundle. The issue I am running into is that under a certain case some common libraries that get built by the project are not being resolved correctly. Here goes the explanation:<br>
><br>
> I have a project "IPHelper.app". Part of the project is building 2 shared libraries, MXADataModel and AIMLib. I also use some of the Qt Imageformat plugins and I build my own Qt Plugins for the application.<br>
><br>
> So, I use fixup_bundle (from a .cmake file that gets configured). I have a list of the plugins (both mine and Qt's image formats) that gets passed in. I also have a list of directories to search for libraries.<br>
><br>
> Here is the snippet of CMake code:<br>
> fixup_bundle("${CMAKE_INSTALL_PREFIX}/IPHelperApp.app"<br>
> # Plugins to Install<br>
> "${PLUGIN_LIST}"<br>
> # Directories to Search for Libraries<br>
> "/Users/mjackson/Workspace/IPHelper/Build/Bin;/Users/Shared/Toolkits/Qt-4.6.2-Cocoa/bin;/Users/Shared/Toolkits/Qt-4.6.2-Cocoa/lib;/Users/Shared/Toolkits/Qt-4.6.2-Cocoa/plugins/imageformats")<br>
><br>
> If I run "make install" I will get all the plugins but NONE of the libraries (MXADataModel and AIMLib) copied or fixed up.<br>
><br>
> If I run "make install" where the ${PLUGIN_LIST} variable is actually blank then I get the libraries (MXADataModel and AIMLib) to resolve, copy and get fixed up, but obviously none of the plugins. I am not sure if I am doing something wrong, there is a bug in BundleUtilities or what.<br>
><br>
> Some output from the first run where I have a plugin list with some status output enabled from BundleUtilities.cmake:<br>
><br>
> -- 7/20: copying '@executable_path/../lib/libAIMLib.dylib'<br>
> -- key='libAIMLib_dylib'<br>
> -- item='@executable_path/../lib/libAIMLib.dylib'<br>
> -- resolved_item='@executable_path/../lib/libAIMLib.dylib'<br>
> -- default_embedded_path='@executable_path/../lib'<br>
> -- embedded_item='@executable_path/../lib/libAIMLib.dylib'<br>
> -- resolved_embedded_item='/Users/Shared/Toolkits/IPHelper/IPHelperApp.app/Contents/lib/libAIMLib.dylib'<br>
> -- copyflag='1'<br>
> --<br>
> Error copying file "@executable_path/../lib/libAIMLib.dylib" to "/Users/Shared/Toolkits/IPHelper/IPHelperApp.app/Contents/lib/libAIMLib.dylib".<br>
><br>
><br>
> and here is output from the second run:<br>
> -- 4/10: copying '/Users/mjackson/Workspace/IPHelper/Build/Bin/libAIMLib.dylib'<br>
> -- key='libAIMLib_dylib'<br>
> -- item='libAIMLib.dylib'<br>
> -- resolved_item='/Users/mjackson/Workspace/IPHelper/Build/Bin/libAIMLib.dylib'<br>
> -- default_embedded_path='@executable_path/../lib'<br>
> -- embedded_item='@executable_path/../lib/libAIMLib.dylib'<br>
> -- resolved_embedded_item='/Users/Shared/Toolkits/IPHelper/IPHelperApp.app/Contents/lib/libAIMLib.dylib'<br>
> -- copyflag='1'<br>
><br>
> I have no idea what is going on and would appreciate any enlightening thoughts. Maybe I am just not using fixup_bundle correctly.<br>
><br>
> The source is located at <a href="http://scm.bluequartz.net/eim/iphelper" target="_blank">http://scm.bluequartz.net/eim/iphelper</a> on the "user_init" branch.<br>
><br>
> Thanks<br>
> ___________________________________________________________<br>
> Mike Jackson <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
> Principal Software Engineer <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
> BlueQuartz Software Dayton, Ohio<br>
><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>