<div>Hi ,</div>
<div> </div>
<div>I have defined a variable for a set of libraries that i want to link with some executables.</div>
<div> </div>
<div>But with one executble i dont want to use one of the library from the set of libraries.</div>
<div> </div>
<div>Can i unlink that particular library for this executable since iam using a variable for all those libraries.</div>
<div> </div>
<div>Eg: Folder main Cmakelist</div>
<div>set( var</div>
<div> path/l1.so</div>
<div>path/l1.so</div>
<div>path/l2.so</div>
<div>path/l3.so</div>
<div>path/l4.so</div>
<div>path/l5.so</div>
<div>path/l6.so</div>
<div>path/l7.so</div>
<div>path/l8.so</div>
<div>path/l9.so)</div>
<div>
<div>add_subdirectory(f1)</div>
<div>add_subdirectory(f2)</div></div>
<div> </div>
<div> </div>
<div>f1....</div>
<div> ...a1.C</div>
<div>CMakeList for f1 contains:</div>
<div>add_executable(a1 a1.C)</div>
<div>target_link_libraries(a1 ${var})</div>
<div> </div>
<div> </div>
<div>
<div>f2....</div>
<div> ...a2.C</div>
<div>CMakeList for f2 contains:</div>
<div>add_executable(a2 a2.C)</div>
<div> </div>
<div>Now for this i dont want the l9 library. one way is to explicitly link all the other libraries.</div>
<div>Is there any other way by which i can specifically unlink this library l9 or say able to link only other libraries.</div>
<div> </div>
<div>Ankit</div>
<div> </div>
<div> </div>
<div> </div></div>
<div> </div>
<div> </div>
<div>
<div class="width" id="match-details">
<h2><span><span> </span></span></h2></div></div>