diff options
author | Douglas Royds <douglas.royds@taitradio.com> | 2021-03-18 12:25:14 +1300 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2021-03-24 04:30:32 -1000 |
commit | 0b5d825ccb251bd6015dfcd49ed452b7bd64e6f6 (patch) | |
tree | cb558268d55a34feede452e0a3d6220e624d6e4d | |
parent | d75f95a09e5e85eb759e748f9e0fee1c5fa1b318 (diff) | |
download | openembedded-core-contrib-0b5d825ccb251bd6015dfcd49ed452b7bd64e6f6.tar.gz |
cmake: Fully-qualified path to ar
We (correctly enough) pass in our AR to cmake via the toolchain file,
but unlike the other cross-compilation tools (CC, CXX, ranlib, etc),
cmake does not then do its own search in the PATH for our AR.
By using cmake's own find_program() to search the PATH,
make works as expected from the commandline, outside of bitbake.
Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e9180c9575f0723b51915a0da58452511b6b03bf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/classes/cmake.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index 8243f7ce8c..af6a8c4395 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass @@ -102,7 +102,8 @@ set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} ) set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} ) set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} ) set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} ) -set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" ) +find_program( CMAKE_AR ${OECMAKE_AR} DOC "Archiver" REQUIRED ) + set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" ) |