[CMake] adding dependencies to a target

abid rahman abidrahman2 at gmail.com
Sat Jun 28 01:23:21 EDT 2014


Hello,

I am adding a new target using "add_library(target source1 source2)". Then
add the dependencies of targets by "target_link_libraries(target deps)"

But this source2 is generated by another python script based on
dependencies of target. ie, I need to specify the dependencies of target
before the add_library() line. But unfortunately target is not created
before add_library() line. So how can I specify the dependencies of target
before add_library() or is there any other workaround?

(Sorry, if question is not clear, I am new to cmake. Let me know if I need
to explain more)

Abid K.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140628/68229f7e/attachment-0001.html>


More information about the CMake mailing list