Pau Garcia i Quiles wrote:

I'm using CMake 2.8.0 on Linux. Yes, Michael is right: I want it to
happen automagically. That was the whole point of this thread :-)

OK, well the thread has a very bad subject then....

It should be "force find_library to choose static over shared". This really has nothing to do with target_link_libraries at all. When given a static library target_link_libraries will use it.

The next part is how to change find_library to find only static libraries. If you really wanted this now, you could implement it in cmake code for your project using find_file and only looking for .a libraries if UNIX is on. For windows it would be much harder to implement as there is no way to tell the difference from the shared and static as they both end in .lib.


-Bill

_______________________________________________
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

Reply via email to