2012/1/26 Khem Raj <[email protected]>:
> On Wed, Jan 25, 2012 at 11:24 AM, Greg Kogut <[email protected]> wrote:
>> I hope this isn't too much of a n00b question.
>>
>> I've developed a dozen new recipes (which I'll submit once they're stable), 
>> most of which use cmake.
>>
>> Some of them install libraries to alternative library locations, e.g. 
>> '/opt/myprog/lib'.   This works correctly, and I've verified the libraries 
>> are installed to the correct locations in the filesystem image.
>>
>> However, while building binaries dependent on these new libraries, also 
>> using cmake, cmake tries to point the linker to these directories on the 
>> host machine, not the cross-compiler filesystem.  With predictable results.
>>
>> What is the correct practice for correctly guiding cmake to the right 
>> location?  I've searched the existing recipes which use cmake without 
>> finding anything.
>>
>
> Does adding something like
> set( CMAKE_LIBRARY_PATH ${libdir} /opt/myprog/lib)
> to classes/cmake.bbclass help
>
>> Regards,
>> Greg
>> _______________________________________________
>> Openembedded-devel mailing list
>> [email protected]
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
> _______________________________________________
> Openembedded-devel mailing list
> [email protected]
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Since CMake 2.4 it is possible to append without overwriting:
LIST( APPEND CMAKE_LIBRARY_PATH path_to_libs )

However, the same thing Khem proposed can be done per recipe,
apply the following line to your recipe and change it to suit your needs:
EXTRA_OECMAKE = "-DCMAKE_LIBRARY_PATH=${libdir} ${path_to_libs}"


Maybe it is necessary to use escaped quoting marks like \"${libdir}
${path_to_libs}\" to group the values.

-- 
Regards
Samuel

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Reply via email to