[CMake] Fwd: TARGET_LINK_LIBRARIES not working for MSVC

John Drescher drescherjm at gmail.com
Sat Jan 8 09:34:05 EST 2011


---------- Forwarded message ----------
From: Avanindra Singh <avanindra.singh at gmail.com>
Date: Sat, Jan 8, 2011 at 9:31 AM
Subject: Re: [CMake] TARGET_LINK_LIBRARIES not working for MSVC
To: John Drescher <drescherjm at gmail.com>


Hi john,

Thanks for the reply.Multiple TARGET_LINK_LIBRARIES
 did not give any configuration error. Though I removed the WIN32 If
block, but I am still getting the same linking errors.
TARGET_LINK_LIBRARIES(hybridnccsurfacecoloring bundler imagelib matrix mathlib
                      5point libsba  libepnp
                      sfm libDescriptors f2c  minpack lapack ann getopt jpeg)
#if(WIN32)
#TARGET_LINK_LIBRARIES(hybridnccsurfacecoloring getopt jpeg)
#endif(WIN32)
I am absolutely clueless why the linker is not generated in the msvc
project. Any idea what could be the possible reason for it?...
Thanks
Avanindra

On Sat, Jan 8, 2011 at 7:49 PM, John Drescher <drescherjm at gmail.com> wrote:
>
> > TARGET_LINK_LIBRARIES(hybridnccsurfacecoloring bundler imagelib matrix
> > mathlib
> >                       5point libsba  libepnp
> >                       sfm libDescriptors f2c  minpack lapack ann)
> > if(WIN32)
> > TARGET_LINK_LIBRARIES(hybridnccsurfacecoloring getopt jpeg)
> > endif(WIN32)
> >
> >
>
> I do not think you can have multiple TARGET_LINK_LIBRARIES for the
> same target. I could be wrong but I never do it that way. I generate
> what is added inside a variable.
>
> John




-- 
John M. Drescher


More information about the CMake mailing list