[CMake] Why does Cmake never add libs when it comes to static linking?

ariasgore at gmx.de ariasgore at gmx.de
Mon Jun 22 11:56:32 EDT 2009


Hello,
I have some code that uses some libs in the following defined vars:

# -------------------------------------------------------------------------
# Add everything into executable
# -------------------------------------------------------------------------
ADD_LIBRARY(${PROJECTNAME1} ${sources} ${includes} ${vectors} )

# ----------------------------------------------------------------------------
# Link libraries
# ----------------------------------------------------------------------------
TARGET_LINK_LIBRARIES ( ${PROJECTNAME1}  
			${OPENSCENEGRAPH_LIBRARIES}
			${OSG_LIBRARY}
)

If I build this as a shared library (e.g. DLL) I can see in the linker settings all mentioned libraries with TARGET_LINK_LIBRARIES, that is fine.
But when I build a static library, none of the linked libraries occur in the /IMPLIB dialog. To be precisely they occur nowhere! So where do they vanish?
I am quite desperate about that.

Thanks
Sam
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


More information about the CMake mailing list