Reputation: 51565
I need to get an actual list of libraries that cmake command invokes. A list may be:
/System/Library/Frameworks/Accelerate.framework;/usr/lib/libmpi_cxx.dylib
and so on with eventual command containing for example
g++ ... /usr/lib/libmpi_cxx.dylib -framework Accelerate
How can I get the actual transformed library list?
Upvotes: 1
Views: 172
Reputation: 78458
You can get the dependencies for a given target from the LINK_LIBRARIES property. So, if your target is called MyExe
, you can do:
get_target_property(Dependencies MyExe LINK_LIBRARIES)
Upvotes: 2