All of lore.kernel.org
 help / color / mirror / Atom feed
* changing content of configuration parameters of Cmakelist file from .bb file
@ 2016-10-12 11:33 nitish jha
  2016-10-12 15:23 ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: nitish jha @ 2016-10-12 11:33 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

Hello All,

I want to change few configuration Parameters of default vsomeip
CMakelist.txt file from .bb file at runtime so that I can install vsome ip
using cmake from usr/lib to usr/lib64.

Contents of my .bb file:

DESCRIPTION = "A C++ SOME/IP implementation"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"

#DEPENDS = "boost dlt-daemon"
DEPENDS = "boost"

SRC_URI = "\
    git://git.projects.genivi.org/vSomeIP.git;protocol=http;nobranch=1 \
    "

SRCREV = "2b7442a4c2452f8f3bd9e0f09f829478256d39af"
#SRC_URI += "file://0001-modified-cmakelists.patch"

S = "${WORKDIR}/git"

inherit cmake

do_configure_append() {
    cmake -INSTALL_LIB_DIR=/usr/lib64
}

PACKAGES += "${PN}-examples ${PN}-config"

FILES_${PN} = "${libdir}"
FILES_${PN}-examples = "${bindir}"
FILES_${PN}-dev += "${libdir}/cmake/vsomeip/*"
FILES_${PN}-config += "/usr/etc/vsomeip/*.json"

but at runtime this file gives error

Thanks and Regards

-- 
*Nitish Jha*

[-- Attachment #2: Type: text/html, Size: 1744 bytes --]

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

* Re: changing content of configuration parameters of Cmakelist file from .bb file
  2016-10-12 11:33 changing content of configuration parameters of Cmakelist file from .bb file nitish jha
@ 2016-10-12 15:23 ` Burton, Ross
  2016-10-13 11:57   ` nitish jha
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2016-10-12 15:23 UTC (permalink / raw)
  To: nitish jha; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

On 12 October 2016 at 12:33, nitish jha <nitishjha16@gmail.com> wrote:

> do_configure_append() {
>     cmake -INSTALL_LIB_DIR=/usr/lib64
> }
>

http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#ref-classes-cmake
covers this.

Use EXTRA_OECMAKE to pass your extra options to cmake, i.e.

EXTRA_OECMAKE = "-DINSTALL_LIB_DIR=${libdir}"

Ross

[-- Attachment #2: Type: text/html, Size: 1057 bytes --]

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

* Re: changing content of configuration parameters of Cmakelist file from .bb file
  2016-10-12 15:23 ` Burton, Ross
@ 2016-10-13 11:57   ` nitish jha
  2016-10-14  8:44     ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: nitish jha @ 2016-10-13 11:57 UTC (permalink / raw)
  To: Burton, Ross; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]

Hello Ross,

Thanks for the help, it worked.

I need one more help, if you could.

I want to assign value to a variable in my recipe file by using awk command


do_configure_prepend() {

var_lib = awk -F '/'  '{$2}'  '${libdir}'
}


#EXTRA_OECMAKE += "-DEF_INSTALL_CMAKE_DIR:PATH=${var_lib}/cmake/vsomeip"

EXTRA_OECMAKE += "-DINSTALL_LIB_DIR:PATH=${var_lib}"

EXTRA_OECMAKE += "-DINSTALL_CMAKE_DIR:PATH=${var_lib}/cmake/vsomeip"




*here libdir = /usr/lib64.*

But when I compile it give me error while running command in do_configure
append

Do I need to inherit anything to run shell command through recipes.

Thanks and Regards

Nitish Jha


On Wed, Oct 12, 2016 at 5:23 PM, Burton, Ross <ross.burton@intel.com> wrote:

>
> On 12 October 2016 at 12:33, nitish jha <nitishjha16@gmail.com> wrote:
>
>> do_configure_append() {
>>     cmake -INSTALL_LIB_DIR=/usr/lib64
>> }
>>
>
> http://www.yoctoproject.org/docs/2.1/ref-manual/ref-
> manual.html#ref-classes-cmake covers this.
>
> Use EXTRA_OECMAKE to pass your extra options to cmake, i.e.
>
> EXTRA_OECMAKE = "-DINSTALL_LIB_DIR=${libdir}"
>
> Ross
>

[-- Attachment #2: Type: text/html, Size: 2739 bytes --]

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

* Re: changing content of configuration parameters of Cmakelist file from .bb file
  2016-10-13 11:57   ` nitish jha
@ 2016-10-14  8:44     ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2016-10-14  8:44 UTC (permalink / raw)
  To: nitish jha; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On 13 October 2016 at 12:57, nitish jha <nitishjha16@gmail.com> wrote:

> I want to assign value to a variable in my recipe file by using awk command
>
>
> do_configure_prepend() {
>
> var_lib = awk -F '/'  '{$2}'  '${libdir}'
> }
>
>
> #EXTRA_OECMAKE += "-DEF_INSTALL_CMAKE_DIR:PATH=${var_lib}/cmake/vsomeip"
>
> EXTRA_OECMAKE += "-DINSTALL_LIB_DIR:PATH=${var_lib}"
>
> EXTRA_OECMAKE += "-DINSTALL_CMAKE_DIR:PATH=${var_lib}/cmake/vsomeip"
>
>
>
>
> *here libdir = /usr/lib64.*
>
> But when I compile it give me error while running command in do_configure
> append
>
> Do I need to inherit anything to run shell command through recipes.
>

If you didn't used $var_lib instead of ${var_lib} (as bitbake only expands
${foo}, $var_lib will exist when the shell runs) then this will work.
However, this isn't pretty.  Just use ${baselib}, the name of the final
directory in ${libdir}, which is presumably what you want.

Ross

[-- Attachment #2: Type: text/html, Size: 1752 bytes --]

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

end of thread, other threads:[~2016-10-14  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-12 11:33 changing content of configuration parameters of Cmakelist file from .bb file nitish jha
2016-10-12 15:23 ` Burton, Ross
2016-10-13 11:57   ` nitish jha
2016-10-14  8:44     ` Burton, Ross

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.