[OE-core] [PATCH] cmake.bbclass: use `cmake --build` to build & install
Cody P Schafer
dev at codyps.com
Mon May 1 19:42:23 UTC 2017
Rather than presuming `make` is the generator, use cmake's generic
`cmake --build` feature (which knows to call the appropriate generator).
Both DESTDIR and VERBOSE still behave as intended when used as
environment variables instead of make variable-arguments.
This makes it more straight forward for others to select other cmake
generators (many folks have been reaching for `ninja` lately).
Signed-off-by: Cody P Schafer <dev at codyps.com>
---
meta/classes/cmake.bbclass | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 12df617ad8..05ec50d385 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -135,13 +135,11 @@ cmake_do_configure() {
do_compile[progress] = "percent"
cmake_do_compile() {
- cd ${B}
- base_do_compile VERBOSE=1
+ VERBOSE=1 cmake --build '${B}'
}
cmake_do_install() {
- cd ${B}
- oe_runmake 'DESTDIR=${D}' install
+ DESTDIR='${D}' cmake --build '${B}' --target install
}
EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file
--
2.12.2
More information about the Openembedded-core
mailing list