[CMake] Registering imported library,

Łukasz Tasz lukasz at tasz.eu
Thu Oct 27 09:23:23 EDT 2011


hmm how to say...

I'm stack with old version of CMake, and cmake 2.8.6 is working fine!

when bar target is resolved while creating linking command for foo,
IMPORTED_LOCATION OF baz is known in cmake 2.8, but it's unnown in 2.6
so linking command for 2.6 is -lbaz, while for 2.8 it's full location to baz.

I gess that it's implemented inside cmake, that while registering bar.
Information about linked-libraries is resolved (while target baz still
is registered) immediately (cmake 2.8), not while creating link
command for foo, while baz cannot be resolved as a target, that's why
-lbaz is added to link command.

Initially I thought that's a mater of scope IMPORTED target, then I
check docs and scope is same for 2.6, and 2.8.

regards
Lukasz



2011/10/27 Eric Noulard <eric.noulard at gmail.com>:
> 2011/10/27 Łukasz Tasz <lukasz at tasz.eu>:
>> Problem solved.
>
> It would have been nice to know how :-]
>
>
> --
> Erk
> Membre de l'April - << promouvoir et défendre le logiciel libre >> -
> http://www.april.org
>



-- 
Lukasz Tasz


More information about the CMake mailing list