diff options
Diffstat (limited to 'meta/classes/cmake.bbclass')
-rw-r--r-- | meta/classes/cmake.bbclass | 11 |
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}" | |||
34 | EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} " | 34 | EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} " |
35 | EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} " | 35 | EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} " |
36 | 36 | ||
37 | OECMAKE_TARGET_COMPILE ?= "all" | ||
38 | OECMAKE_TARGET_INSTALL ?= "install" | ||
39 | |||
37 | FILES_${PN}-dev += "${libdir}/cmake ${datadir}/cmake" | 40 | FILES_${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 | ||
141 | do_compile[progress] = "percent" | 144 | do_compile[progress] = "percent" |
142 | cmake_do_compile() { | 145 | cmake_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 | ||
147 | cmake_do_install() { | 150 | cmake_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 | ||
152 | EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file | 155 | EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file |