diff options
-rw-r--r-- | meta/classes/cmake.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index e16630434e..d3f0d70847 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
@@ -10,13 +10,14 @@ OECMAKE_GENERATOR ?= "Ninja" | |||
10 | 10 | ||
11 | python() { | 11 | python() { |
12 | generator = d.getVar("OECMAKE_GENERATOR") | 12 | generator = d.getVar("OECMAKE_GENERATOR") |
13 | if generator == "Unix Makefiles": | 13 | if "Unix Makefiles" in generator: |
14 | args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE") | 14 | args = "-G '" + generator + "' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE") |
15 | d.setVar("OECMAKE_GENERATOR_ARGS", args) | 15 | d.setVar("OECMAKE_GENERATOR_ARGS", args) |
16 | d.setVarFlag("do_compile", "progress", "percent") | 16 | d.setVarFlag("do_compile", "progress", "percent") |
17 | elif generator == "Ninja": | 17 | elif "Ninja" in generator: |
18 | args = "-G '" + generator + "' -DCMAKE_MAKE_PROGRAM=ninja" | ||
18 | d.appendVar("DEPENDS", " ninja-native") | 19 | d.appendVar("DEPENDS", " ninja-native") |
19 | d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja -DCMAKE_MAKE_PROGRAM=ninja") | 20 | d.setVar("OECMAKE_GENERATOR_ARGS", args) |
20 | d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+") | 21 | d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+") |
21 | else: | 22 | else: |
22 | bb.fatal("Unknown CMake Generator %s" % generator) | 23 | bb.fatal("Unknown CMake Generator %s" % generator) |