On Fri, Feb 27, 2009 at 4:49 AM, ankit jain <[email protected]> wrote:

> Hi ,
>
> I have defined a variable for a set of libraries that i want to link with
> some executables.
>
> But with one executble i dont want to use one of the library from the set
> of libraries.
>
> Can i unlink that particular library for this executable since iam using a
> variable for all those libraries.
>
> Eg:  Folder main Cmakelist
> set( var
>       path/l1.so
> path/l1.so
> path/l2.so
> path/l3.so
> path/l4.so
> path/l5.so
> path/l6.so
> path/l7.so
> path/l8.so
> path/l9.so)
>

Why not just do

set( some
      path/l1.so
path/l1.so
path/l2.so
path/l3.so
path/l4.so
path/l5.so
path/l6.so
path/l7.so
path/l8.so)
set( all ${some} path/l9.so)

add_executable(a1 a1.C)
target_link_libraries(a1 ${all})

add_executable(a2 a2.C)
target_link_libraries(a2 ${some})

-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to