mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Fix cross-compilation when usign the SDK
This commit is contained in:
parent
d00d0615e3
commit
ecc339e68b
@ -23,6 +23,16 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
FORCE)
|
FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Workaround for cross-compilation with SDK
|
||||||
|
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||||
|
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake)
|
||||||
|
set(CMAKE_CROSSCOMPILING ON)
|
||||||
|
include(${CMAKE_TOOLCHAIN_FILE})
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^cortexa9hf")
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR arm-${CMAKE_SYSTEM_PROCESSOR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# BUILD_TESTING is a standard CMake variable, but we declare it here to make it
|
# BUILD_TESTING is a standard CMake variable, but we declare it here to make it
|
||||||
# prominent in the GUI.
|
# prominent in the GUI.
|
||||||
option(BUILD_TESTING "Enable test (depends on googletest)." OFF)
|
option(BUILD_TESTING "Enable test (depends on googletest)." OFF)
|
||||||
|
Loading…
Reference in New Issue
Block a user