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

Tyler Roscoe tyler at cryptio.net
Mon Jun 22 12:03:05 EDT 2009


On Mon, Jun 22, 2009 at 05:56:32PM +0200, ariasgore at gmx.de wrote:
> # ----------------------------------------------------------------------------
> # 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?

Are you sure static libs are supposed to show up for /IMPLIB? That looks
like an option for handling import libraries (only used with DLLs).

Look in the "command line" dialog and I'll bet you see the static libs
showing up somewhere else at link time.

tyler


More information about the CMake mailing list