diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/Toolchain.cmake.in | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in index 7b32712c4d..7f86d8b002 100644 --- a/tools/depends/target/Toolchain.cmake.in +++ b/tools/depends/target/Toolchain.cmake.in @@ -31,9 +31,16 @@ set(CMAKE_CXX_COMPILER @CXX@) set(CMAKE_AR @AR@ CACHE FILEPATH "Archiver") set(CMAKE_LINKER @LD@ CACHE FILEPATH "Linker") -# where is the target environment -set(CMAKE_FIND_ROOT_PATH @prefix@/@deps_dir@ @use_toolchain@ @use_toolchain@/usr @use_sdk_path@ @use_sdk_path@/usr @use_toolchain@/sysroot/usr) -set(CMAKE_LIBRARY_PATH @prefix@/@deps_dir@/lib:@use_toolchain@/usr/lib/@use_host@:@use_toolchain@/lib/@use_host@) +# 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@/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() # add RBPI's firmware directories if("${CORE_SYSTEM_NAME}" STREQUAL "rbpi") |