]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jul 2020 11:45:52 +0000 (12:45 +0100)
commit01245db2893e39ffb5d4a00e4689f048d0698974
tree21cc4961b527d5da9249b366070cd3af216f8ed8
parenta64caca5b5dbe4a76acd0b5709b2c3e75b245863
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>
meta/classes/cmake.bbclass