On 11/04/2011 11:11 PM, Belcourt, K. Noel wrote: > > On Nov 4, 2011, at 3:56 PM, Belcourt, K. Noel wrote: > >> This is a long overdue followup. >> >> On Dec 4, 2010, at 12:10 PM, Belcourt, K. Noel wrote: >> >>> On Dec 4, 2010, at 10:08 AM, Ryan Pavlik wrote: >>> >>>> You can configure this for your project: >>>> http://www.cmake.org/cmake/help/cmake-2-8- >>>> docs.html#prop_tgt:STATIC_LIBRARY_FLAGS >> >> STATIC_LIBRARY_FLAGS are passed to the archiver. On the Mac, I need >> to run ranlib after ar runs, and pass flags (-c) to ranlib. Another >> other ideas how to achieve this? > > If I use a custom command like this (physics is the name of the static > library): > > add_custom_command(TARGET physics POST_BUILD COMMAND ranlib -c)
This custom command can't work since you don't provide the library as argument for ranlib. How exactly does the failing command look alike? > I get this error when it tries to run. > > "/usr/bin/ranlib -c" libphysics.a > Error running link command: No such file or directory > make[2]: *** [libs/test/physics/libphysics.a] Error 2 > > Because the quoted command includes the argument. Any ideas? Have you tried the VERBATIM flag, yet? Regards, Michael -- 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