Hi all,

I was wondering why the link_libraries() command has been deprecated. Commands 
like include_directories() and link_directories() which have the same "scope" 
have not been deprecated. I think that link_libraries() has its virtues too.

My reason for asking this, is that I wonder what's the proper way to add a 
library to *all* targets in a project; for example, a logging library or a 
threads library. Here, link_libraries() provides IMHO a much cleaner solution, 
than target_link_libraries(). The latter requires me to keep track of the 
globally used library in a variable that must be passed around; and for each 
target I must explicitly specify its dependency on this library by using 
target_link_libraries().

Or, am I missing something, and is there a cleaner way to do this, without 
using a deprecated feature?

Best regards,
Marcel Loose.

_______________________________________________
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