q7s x-compile file update
This commit is contained in:
parent
e79336a68a
commit
dd9b08953c
@ -1,10 +1,12 @@
|
|||||||
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
|
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
|
||||||
|
|
||||||
if(NOT DEFINED ENV{Q7S_SYSROOT})
|
if(NOT DEFINED ENV{Q7S_SYSROOT})
|
||||||
# message(FATAL_ERROR
|
# Sysroot has not been cached yet and was not set in environment either
|
||||||
# "Define the Q7S_ROOTFS variable to "
|
if(NOT DEFINED SYSROOT_PATH)
|
||||||
# "point to the raspbian rootfs."
|
message(FATAL_ERROR
|
||||||
# )
|
"Define the Q7S_ROOTFS variable to "
|
||||||
|
"point to the raspbian rootfs."
|
||||||
|
)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE PATH "Q7S root filesystem path")
|
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE PATH "Q7S root filesystem path")
|
||||||
endif()
|
endif()
|
||||||
@ -36,8 +38,11 @@ set(CROSS_COMPILE_OBJCOPY "${CROSS_COMPILE}-objcopy")
|
|||||||
set(CROSS_COMPILE_SIZE "${CROSS_COMPILE}-size")
|
set(CROSS_COMPILE_SIZE "${CROSS_COMPILE}-size")
|
||||||
|
|
||||||
# At the very least, cross compile gcc and g++ have to be set!
|
# At the very least, cross compile gcc and g++ have to be set!
|
||||||
find_program (CROSS_COMPILE_CC_FOUND ${CROSS_COMPILE_CC} REQUIRED)
|
find_program (CMAKE_C_COMPILER ${CROSS_COMPILE_CC} REQUIRED)
|
||||||
find_program (CROSS_COMPILE_CXX_FOUND ${CROSS_COMPILE_CXX} REQUIRED)
|
find_program (CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX} REQUIRED)
|
||||||
|
# Useful utilities, not strictly necessary
|
||||||
|
find_program(CMAKE_SIZE ${CROSS_COMPILE_SIZE})
|
||||||
|
find_program(CMAKE_OBJCOPY ${CROSS_COMPILE_OBJCOPY})
|
||||||
|
|
||||||
set(CMAKE_CROSSCOMPILING TRUE)
|
set(CMAKE_CROSSCOMPILING TRUE)
|
||||||
set(CMAKE_SYSROOT "${SYSROOT_PATH}")
|
set(CMAKE_SYSROOT "${SYSROOT_PATH}")
|
||||||
|
Loading…
Reference in New Issue
Block a user