On Thu, 11 Nov 2010 07:07:48 -0500 [email protected] wrote: > Any help is greatly appreciated!
I'd help if I could. Unfortunately I'm still stuck on this. Usually I
can work around a problem given enough time, but this is a real
stumper. Actually I do have a suggestion (see below) but it's kind of
ugly.
> Adam J Richardson <fat...@...> writes:
> > (That is, if I manually separate
> > "C:\Compilers\Libs\libboost_thread-mgw44-mt-1_44.a" into
> > "-LC:\Compilers\Libs -lboost_thread-mgw44-mt-1_44".)
> >
> > Is there a way to have CMake do this by itself and not use absolute
> > paths? I've tried setting CMP0003 to OLD but it doesn't seem to do
> > that.
>
> I've run into the same problem recently.
>
> It seems to be because the underlying find_library() call returns full
> paths instead of just library names. Linking against libraries as
> inputs (specifying as full paths) instead of libraries (specifying
> name with -l) seems to lead to inconsistent results on different
> platforms.
Is this actually a CMake bug? Just after posting it occurred to me that
this might be a MinGW bug. Shouldn't g++ find the library whether you
give it "C:\Compilers\Libs\libboost_thread-mgw44-mt-1_44.a" or
"-LC:\Compilers\Libs -lboost_thread-mgw44-mt-1_44"?
> The FindBoost script does set a Boost_LIBRARY_DIRS variable, so you
> can use link_directories() to basically add the -L option. But I'm at
> a loss as to how to properly set the -l options.
I suppose you could manually
set_target_properties(targ PROPERTIES LINK_FLAGS "${LINK_FLAGS}
-lboost_thread")
but that seems a little hackish. No, I'll poke some more at g++ and see
what I can come up with.
Regards,
Adam J Richardson
signature.asc
Description: PGP signature
_______________________________________________ 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
