> You can definition two different library target
> and use OUTPUT_NAME property to adjust the name
>
> add_library(foo1 ${foo_source})
> set_target_properties(foo1 PROPERTIES
>                                       OUTPUT_NAME foo)
>
> add_library(foo2 ${foo_source})
> set_target_properties(foo2 PROPERTIES
>                                       OUTPUT_NAME foo)
>
> You probably want to adjust COMPILE_FLAGS and/or LINK_FLAGS
> for each target as well.

That's what I already do. I also set different *_OUTPUT_DIRECTORY to
avoid collisions. The problem is, I cannot define different PROJECTs,
so foo_1 and foo_2 are in the same VS workspace.

> If you intend to build those librarie during the same build then
> you'll have to define those targets in separate directories
> (with shared source are shared).

So?

foo
|
|- foo_1
   |- CMakelists.txt
|- foo_2
   |- CMakelists.txt
|
|- foo.cpp

-- 
BG,
Alexey
_______________________________________________
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