Thanks, this is exactly what I need. Just one question. Why the function gp_resolved_file_type_override() cannot be seen if it is implemented in my project's CMakeLists.txt? I have to add it in GetPrerequisite.cmake module, but that's not good.
Thanks, Joe On Mon, May 7, 2012 at 11:04 AM, David Cole <[email protected]> wrote: > /usr/X11/lib/libglut.dylib should probably be considered a "system > library" that is not included in your final bundle. > > Therefore, all users of your application will have to have the Mac OS > X version of X installed and available in order to run your program. > (Is that all Macs nowadays anyway...?) > > In order to classify it as a system library, you can provide a CMake > function named gp_resolved_file_type_override to look for that library > (probably anything starting with "/usr/X11/lib") and set its type to > "system" -- that will cause fixup_bundle to ignore it for copying and > fixup purposes. > > > HTH, > David > > > On Mon, May 7, 2012 at 10:57 AM, Joe Ping-Lin Hsiao <[email protected]> wrote: >> Hi, >> >> I use CMake to create an installer for a Mac program which uses GLUT. >> The GLUT library that the program links against with is >> /usr/X11/lib/libglut.dylib. >> >> When I use fixup_bundle() to create an installer, I get the following >> error message: >> >> install_name_tool: changing install names or rpaths can't be redone >> for: >> /Users/phsiao/dev/video/video_spot_tracker.app/Contents/MacOS/libglut.3.dylib >> (for architecture ppc7400) because larger updated load commands do not >> fit (the program must be relinked, and you may need to use -headerpad >> or -headerpad_max_install_names) >> >> The first thing I tried was to add -headerpad_max_install_names and >> -headerpad to the linker flags, but no success. (Actually >> -headerpad_max_install_names already exists in CMakeFies/link.txt >> before I put it in.) >> >> The next thing I tried was to add '-arch x86_64' to both CXX_FLAGS and >> LINKER_FLAGS to avoid fixup_bundle() to fix dependencies for >> architecture ppc7400, but the error remains. >> >> Any idea how to get around this? >> >> Thanks, >> Joe >> -- >> >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
