<p>A few ideas:</p><div><br></div><div>Set the targets' LINK_FLAGS separately to specify the linker dirs. </div><div><br></div><div>Use target_link_libraries on the file path rather than the lib name. </div><div><br></div><div>Make an imported library target for the libs in each dir and then link with those targets. (I'm assuming these are not libs you're building)</div><div class="mailbox_signature">-- <br>Cheers,<br>Leif<br></div><br><br><div class="gmail_quote"><p>On Tue, Apr 2, 2013 at 12:08 PM, domenico <span dir="ltr"><<a href="mailto:the.secator@gmail.com" target="_blank">the.secator@gmail.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Hi there !<div><br></div><div style="">I'm quite new to CMake, so please forgive me if the question seems obvious.</div><div style="">My project has lines like :</div><div style=""><br></div><div style=""><div>link_directories(/path/to/libA/)</div>
<div>add_library(my_project SHARED my_file.cpp)</div><div>target_link_libraries(my_project A)</div><div><br></div><div style="">I browsed help and googled a few, but I still wonder how I could set "/path/to/libA/" to be different according to targets.</div>
<div style="">Something like "/path/to/libA/Foo/" for some targets "/path/to/libA/Bar/" for others.</div><div style="">But my targets are not the basic "Release/Debug/..." ones, more diverse.</div>
<div style=""><br></div><div style="">Info : I'm working with VS2008, but trying CMake for Mac/Linux/iOS ports.</div><div style=""><br></div><div style="">Thanks</div><div style="">Domé</div><div><br></div></div></div></blockquote></div><br>