All of lore.kernel.org
 help / color / mirror / Atom feed
* how to specify alternative library locations from recipes using cmake
@ 2012-01-25 19:24 Greg Kogut
  2012-01-26  2:11 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kogut @ 2012-01-25 19:24 UTC (permalink / raw)
  To: openembedded-devel

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.

Regards,
Greg
From philip@balister.org Wed Jan 25 21:59:30 2012
Received: from sanddollar.geekisp.com ([216.168.135.167])
	by linuxtogo.org with esmtp (Exim 4.72)
	(envelope-from <philip@balister.org>) id 1Rq9wH-0003L4-M2
	for openembedded-devel@lists.openembedded.org;
	Wed, 25 Jan 2012 21:59:29 +0100
Received: (qmail 13243 invoked by uid 1003); 25 Jan 2012 20:45:01 -0000
Received: from unknown (HELO ?192.168.1.104?)
	(philip@opensdr.com@96.240.160.175)
	by mail.geekisp.com with (DHE-RSA-AES256-SHA encrypted) SMTP;
	25 Jan 2012 20:45:01 -0000
Message-ID: <4F2069CC.7060409@balister.org>
Date: Wed, 25 Jan 2012 15:45:00 -0500
From: Philip Balister <philip@balister.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
MIME-Version: 1.0
To: openembedded-devel@lists.openembedded.org
References: <1592899.mTy93uB97i@helios>
	<1908796.glHMrEiIxU@helios>	<4F202735.8040405@balister.org>
	<3543079.3rgjSx9VfG@helios>
	<1327514250.29933.37.camel@phil-desktop>
In-Reply-To: <1327514250.29933.37.camel@phil-desktop>
X-Enigmail-Version: 1.1.2
Content-Type: text/plain; charset

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to specify alternative library locations from recipes using cmake
  2012-01-25 19:24 how to specify alternative library locations from recipes using cmake Greg Kogut
@ 2012-01-26  2:11 ` Khem Raj
  2012-01-26 13:22   ` Samuel Stirtzel
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2012-01-26  2:11 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Jan 25, 2012 at 11:24 AM, Greg Kogut <gkogut@yahoo.com> 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
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to specify alternative library locations from recipes using cmake
  2012-01-26  2:11 ` Khem Raj
@ 2012-01-26 13:22   ` Samuel Stirtzel
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Stirtzel @ 2012-01-26 13:22 UTC (permalink / raw)
  To: openembedded-devel

2012/1/26 Khem Raj <raj.khem@gmail.com>:
> On Wed, Jan 25, 2012 at 11:24 AM, Greg Kogut <gkogut@yahoo.com> 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
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-26 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 19:24 how to specify alternative library locations from recipes using cmake Greg Kogut
2012-01-26  2:11 ` Khem Raj
2012-01-26 13:22   ` Samuel Stirtzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.