Hi, On 10 January 2011 17:00, Emmanuel Blot <eblot...@gmail.com> wrote: > Hello, > > Using the ADD_LIBRARY command for a static library (.a), how to tell > CMake to use the ranlib tool for the target, not the default one for > the host? > > I'm getting the following warning message: > > cd watchdog && /usr/local/Cellar/cmake/2.8.3/bin/cmake -E > cmake_link_script CMakeFiles/nd_watchdog.dir/link.txt --verbose=1 > /usr/bin/ar cr libnd_watchdog.a > CMakeFiles/nd_watchdog.dir/src/nd_watchdog.c.o > /usr/bin/ranlib libnd_watchdog.a > /usr/bin/ranlib: warning for library: libnd_watchdog.a the table of > contents is empty (no object file members in the library define global > symbols) > > I'd like to use our dedicated arm-eabi-ranlib tool instead.
When I cross compile I do "set(CMAKE_C_COMPILER arm-linux-gcc)" in a toolchain file and CMake automatically finds ranlib (and other toolchain utilities) using the prefix from the C compiler. How do you setup CMake for cross-compilation? Have you read http://cmake.org/Wiki/CMake_Cross_Compiling ? Best regards, Bjørn Forsman _______________________________________________ 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