I think you don't need a new feature, you just have to use IF-ELSE mechanism
and then TARGET_LINK_LIBRARIES(target ${RESULT_OF_IF_ELSE})
Denis
> * lib3 CMakeLists.txt:
>
> add_library(lib3 some source)
> target_link_libraries(lib3,
> SELECTOR A_OR_B A lib4-A
> SELECTOR A_OR_B B lib4-B
> )
> * exe1-A CmakeLists.txt
> add_executable(exe1-A some sources)
> set (A_OR_B A)
> target_link_libraries(exe1-A lib1)
>
> * exe1-B CmakeLists.txt
> add_executable(exe1-A some sources)
> set (A_OR_B B)
> target_link_libraries(exe1-A lib1)
_______________________________________________
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