diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2023-09-27 19:07:18 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 19:07:18 +1000 |
commit | da558107f42e149d544e3d9603aa4c61996ddf19 (patch) | |
tree | bd42efcbe2f07a7306ce010b7882e307eff113eb /tools/depends | |
parent | 7e58d70dbec409c9341e580f56207969965908e5 (diff) | |
parent | 40c6830800eb29d3c4cd3c06022bea4653c32fe2 (diff) |
Merge pull request #23824 from fuzzard/cmake_findlibass_update
[Cmake] FindASS migrate to TARGET usage
Diffstat (limited to 'tools/depends')
-rw-r--r-- | tools/depends/target/Toolchain.cmake.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in index 8122832a3e..a1d6b548a1 100644 --- a/tools/depends/target/Toolchain.cmake.in +++ b/tools/depends/target/Toolchain.cmake.in @@ -81,13 +81,18 @@ endif() # where is the target environment set(CMAKE_FIND_ROOT_PATH @prefix@/@deps_dir@) set(CMAKE_LIBRARY_PATH @prefix@/@deps_dir@/lib) -if(NOT "@use_toolchain@" STREQUAL "") - list(APPEND CMAKE_FIND_ROOT_PATH @use_toolchain@ @use_toolchain@/@use_host@ @use_toolchain@/@use_host@/sysroot @use_toolchain@/@use_host@/sysroot/usr @use_toolchain@/@use_host@/libc @use_toolchain@/lib/@use_host@/sysroot @use_toolchain@/usr @use_toolchain@/sysroot/usr) - set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH}:@use_toolchain@/usr/lib/@use_host@:@use_toolchain@/lib/@use_host@") -endif() if(NOT "@use_sdk_path@" STREQUAL "") list(APPEND CMAKE_FIND_ROOT_PATH @use_sdk_path@ @use_sdk_path@/usr) endif() +# Currently this is only set to reject android by default +if(NOT "@use_toolchain@" STREQUAL "") + list(APPEND CMAKE_FIND_ROOT_PATH @use_toolchain@/@use_host@ @use_toolchain@/@use_host@/sysroot @use_toolchain@/@use_host@/sysroot/usr @use_toolchain@/@use_host@/libc @use_toolchain@/lib/@use_host@/sysroot @use_toolchain@/usr @use_toolchain@/sysroot/usr) + # Explicitly set this as last. This potentially is /usr which can then cause linux + # cross compilation to search paths that are not relevant to target arch (eg host libs) + # x86/x86_64 jenkins CI jobs require /usr for libs like iconv + list(APPEND CMAKE_FIND_ROOT_PATH @use_toolchain@) + set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH}:@use_toolchain@/usr/lib/@use_host@:@use_toolchain@/lib/@use_host@") +endif() # add Android directories and tools if(CORE_SYSTEM_NAME STREQUAL android) |