[CMake] Question about installing static libraries made with VS 2008
Torri, Stephen CIV NSWCDD, W15
stephen.torri at navy.mil
Mon Jun 14 15:20:47 EDT 2010
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
More information about the CMake
mailing list