How to add target_link_directories to dlls in cmake?
<p>I have 3 dll's with the same name debug/alpha.dll, release/alpha.dll and relwithdebinfo/alpha.dll</p>

<p>I want to get cmake to do this:</p>

<pre><code>target_link_libraries(${PROJECT_NAME} debug ../adir/debug/alpha.dll)
target_link_libraries(${PROJECT_NAME} relwithdebinfo ../adir/relwithdebug/alpha.dll)
target_link_libraries(${PROJECT_NAME} release ../adir/release/alpha.dll)
</code></pre>

<p>This I would think would add those three different dll's depending on what configuration is specified in visual studio 2015.</p>

<p>It ALMOST works, it tries to load:</p>

<pre><code>Error   LNK1104 cannot open file '../adir/debug/alpha.lib'  
</code></pre>

<p>QUESTION: HOW do I get it to substitute DLL for the LIB it put there, I just want it to stop ASSuming lib, and actually listen to what I put, .dll and everything will work great.</p>

<p>Any way to get it to stop helping out so much?  Anyone know another way to do this?
Thanks!</p>