Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass cmake runtime parameter in yocto

Tags:

yocto

bitbake

I am working on yocto, I have a component which I am compiling manually using cmake command. I need to select some options using cmake while compiling. cmake -Dex=on ..., which enables "ex"

Now I am trying to do the same in the yocto, for compilation I used inherit cmake in bb file, but I am not to pass this option -Dex=on

My bb file looks like this

SECTION = "devel"

LICENSE = "CLOSED" SRC_URI = "file://*"

SRC_URI = "gitsm://****.git;protocol=ssh"

SRCREV="${AUTOREV}"

S = "${WORKDIR}/git"

inherit cmake

How can pass cmake options in the bitbake file?

like image 321
anikhan Avatar asked Jan 06 '23 05:01

anikhan


1 Answers

You define the extra symbol by setting

EXTRA_OECMAKE += "-Dex=on"

when you have inherit cmake in your recipe.

The variable is used by the cmake.bbclass when cmake is called.

like image 188
Fl0v0 Avatar answered Jan 20 '23 02:01

Fl0v0