8

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?

Kara
  • 6,115
  • 16
  • 50
  • 57
anikhan
  • 1,147
  • 3
  • 18
  • 44

1 Answers1

13

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.

Fl0v0
  • 900
  • 11
  • 27