[CMake] imported lib properties...

Asmodehn Shade asmodehn at gmail.com
Tue Mar 24 12:45:28 EDT 2009


Hi, Brad,

Yes  I think the second call was using the correct target...

sorry I cant be sure or provide a test example, it was quite some time
ago...

I've been a bit busy implementing some cmake script for automated
dependencies detection and propagation in a chain of project depending on
each other...

I have a question related to that but I ll post it in a new thread...

Thanks anyway,

--
Alex


2009/3/16 Brad King <brad.king at kitware.com>

> Asmodehn Shade wrote:
>
>> I am currently converting my old cmake 2.4 scripts to cmake 2.6.3, as I am
>> enjoying the new possibilities offered by the export / import system
>> I previously implemented my self a little dirty workaround this
>> limitation... so I am pretty happy to see this coming along ;-)
>>
>
> Thanks, I'm glad you like it.
>
>  In my main script I call a few macros :
>>
>> import(project_export.cmake)
>> inspect(project_target)
>>
>> My macros are defined as this :
>>
>> macro ( import external_project_export )
>>     include(${external_project_export})
>>     # I assume I know external_target is defined in
>> ${external_project_export}
>>     get_target_properties(external_target_location ${external_target}
>> LOCATION)
>>     ###OK WORKING
>> endmacro ( import external_project )
>>
>> macro ( inspect target )
>>     get_target_properties(external_target_location_test ${target}
>> LOCATION)
>>     ###NOT FOUND
>> macro ( inspect target )
>>
>> In the second macro call, all the properties I tried to get ( LOCATION,
>> IMPORTED_LOCATION, IMPORTED_LOCATION_DEBUG, etc ) all return NOT_FOUND
>> Yes I even tried to re-include the file desperately, but it tells me the
>> target is already defined, as it should be...
>> So it seems the target lost its properties between the 2 macro calls ??
>>
>
> Are you sure the second call is using the correct target?  Use message() to
> print the name of the target in both cases.
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090324/486a146a/attachment.htm>


More information about the CMake mailing list