[CMake] Build multiple lib

Ryan Pavlik rpavlik at iastate.edu
Wed Sep 22 11:49:22 EDT 2010



On 09/22/2010 10:32 AM, Michael Wild wrote:
> On 22. Sep, 2010, at 12:48 , Andrea Galeazzi wrote:
>
>> Hi everybody,
>> I've got a static lib project in vc6 as follow
>> lib1
>> lib2
>> ......
>> libN
>> MainLib
>>
>> The MainLib doesn't actually have any source but it depends form all the other projects (lib1,.....,libN) so it builds a static lib which contains all the ones.
>> Now my problems is how to write a CMakeLists in order to reproduce both the same build and the same structure of solution in VS 2010 as the original one.
>> Does anybody have any ideas?
>> Cheers
> Do you ever *need* lib1..libN except for assembling MainLib? If not, just drop them, they're useless.
>
> Michael

Furthermore, you could use the source_group feature to organize the 
sources without needing to do the multiple library approach.

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

Member, ACM and ACM SIGCHI
Member, ASME

http://academic.cleardefinition.com



More information about the CMake mailing list