]> code.ossystems Code Review - openembedded-core.git/commit
classes/cmake: Fix host detection
authorJoshua Watt <JPEWhacker@gmail.com>
Tue, 21 Jul 2020 17:52:11 +0000 (12:52 -0500)
committerSteve Sakoman <steve@sakoman.com>
Fri, 24 Jul 2020 14:33:52 +0000 (04:33 -1000)
commit59b8c49a54b8977ba2f3ed4f33f0fd3f7dd749d5
treebd4abc91be4c7b79df2f1b294f840449a38041d7
parent693dc285164eb6cc88cc7174238fd59f0393b5c3
classes/cmake: Fix host detection

Fixes the class to use HOST_OS and HOST_ARCH to set the cmake SYSTEM
variables. The HOST variables should be used instead of
TARGET_OS/TARGET_ARCH because we want to control how cmake compiles for
where the package is going to run (the host), not what it will be
generating output for (the target). The distinction is only really
relevant when building canadian cross recipes.

Also fix up the host OS detection to account for MinGW by setting
CMAKE_SYSTEM_NAME to "Windows". This eliminates the need for meta-mingw
to patch this in all the cmake recipes it builds.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 01245db2893e39ffb5d4a00e4689f048d0698974)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/cmake.bbclass