summaryrefslogtreecommitdiffstats
path: root/meta/classes/cmake.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/cmake.bbclass')
-rw-r--r--meta/classes/cmake.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index a4079dab0d..10c4edcf1a 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -34,6 +34,9 @@ EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
34EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} " 34EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} "
35EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} " 35EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} "
36 36
37OECMAKE_TARGET_COMPILE ?= "all"
38OECMAKE_TARGET_INSTALL ?= "install"
39
37FILES_${PN}-dev += "${libdir}/cmake ${datadir}/cmake" 40FILES_${PN}-dev += "${libdir}/cmake ${datadir}/cmake"
38 41
39# CMake expects target architectures in the format of uname(2), 42# CMake expects target architectures in the format of uname(2),
@@ -140,13 +143,13 @@ cmake_do_configure() {
140 143
141do_compile[progress] = "percent" 144do_compile[progress] = "percent"
142cmake_do_compile() { 145cmake_do_compile() {
143 bbnote VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OECMAKE_BUILD} 146 bbnote VERBOSE=1 cmake --build '${B}' --target ${OECMAKE_TARGET_COMPILE} -- ${EXTRA_OECMAKE_BUILD}
144 VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OECMAKE_BUILD} 147 VERBOSE=1 cmake --build '${B}' --target ${OECMAKE_TARGET_COMPILE} -- ${EXTRA_OECMAKE_BUILD}
145} 148}
146 149
147cmake_do_install() { 150cmake_do_install() {
148 bbnote DESTDIR='${D}' cmake --build '${B}' --target install -- ${EXTRA_OECMAKE_BUILD} 151 bbnote DESTDIR='${D}' cmake --build '${B}' --target ${OECMAKE_TARGET_INSTALL} -- ${EXTRA_OECMAKE_BUILD}
149 DESTDIR='${D}' cmake --build '${B}' --target install -- ${EXTRA_OECMAKE_BUILD} 152 DESTDIR='${D}' cmake --build '${B}' --target ${OECMAKE_TARGET_INSTALL} -- ${EXTRA_OECMAKE_BUILD}
150} 153}
151 154
152EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file 155EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file