On Wed 03 Jun 22:46 2009 Bill Hoffman wrote: > e...@cs.bgu.ac.il wrote: > > > > > thanks for the tip though but my current problem is in regards to the > > linking of external libs, I've used to add them to the > > TARGET_LINK_LIBRARIES but it was suggested here not to use it in that > > way. > OK, I think I see the problem. For external libraries, you should use > find_library and link them in the target_link_libraries. For > internal(things built by CMake), you should just use the name. > > For example > > add_library(foo SHARED foo.c) > find_library(BAR_LIB bar) # find path to bar > target_link_libraries(foo ${BAR_LIB}) # link bar to foo > add_executable(car car.c) > target_link_libraries(car foo) # this will link foo and bar to car > > -Bill > thanks for your help, this solved the issue though I have another problem which isn't cmake based. thanks for your patience.
_______________________________________________ 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