Update before changing history #55

Merged
meierj merged 29 commits from mueller/staging-1-before-history-change into develop 2021-07-23 17:20:20 +02:00
Showing only changes of commit 76e0501813 - Show all commits

View File

@ -1,10 +1,12 @@
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
if(NOT DEFINED ENV{Q7S_SYSROOT})
# message(FATAL_ERROR
# "Define the Q7S_ROOTFS variable to "
# "point to the raspbian rootfs."
# )
# Sysroot has not been cached yet and was not set in environment either
if(NOT DEFINED SYSROOT_PATH)
message(FATAL_ERROR
"Define the Q7S_ROOTFS variable to "
"point to the raspbian rootfs."
)
endif()
else()
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE PATH "Q7S root filesystem path")
endif()
@ -36,8 +38,11 @@ set(CROSS_COMPILE_OBJCOPY "${CROSS_COMPILE}-objcopy")
set(CROSS_COMPILE_SIZE "${CROSS_COMPILE}-size")
# 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 (CROSS_COMPILE_CXX_FOUND ${CROSS_COMPILE_CXX} REQUIRED)
find_program (CMAKE_C_COMPILER ${CROSS_COMPILE_CC} 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_SYSROOT "${SYSROOT_PATH}")