I have a question about building a project with static libraries. If you have a 
set up like the following will the final static library be the only thing that 
you install? I found that there was still unresolved external symbols when I 
only linked against Fruit.lib in the test program.

(project 1 - static)

   add_library ( Apple STATIC ${Apple_SOURCES} ${Apple_HEADERS} )

(project 2 - static) 

   add_library ( Pear STATIC ${Pear_SOURCES} ${Pear_HEADERS} )

(project 3 - static)

   add_library ( Orange STATIC ${Orange_SOURCES} ${Orange_HEADERS} )

(project 4)

   add_library ( Fruit STATIC ${Fruit_SOURCES} ${Fruit_HEADERS} )

   target_link_libraries ( Fruit Apple Pear Orange )

My expectation was that I would have only one static library in the end called 
Fruit.lib with all the symbols of Apple, Pear, Orange and Fruit in it. That is 
what I see for a project that I build on a Linux system using Automake, 
Autoconf and Libtool. In the end on the Linux system I have only one static 
library that I need to install.

So my question is:

1. Do I need only to install Fruit.lib from the given project above to get all 
the symbols in the project?

Stephen

_______________________________________________
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