2021-06-17 21:32:24 +00:00
|
|
|
# Compile For ARM
|
2021-09-17 02:00:40 +00:00
|
|
|
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64_be" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv8b" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv8l")
|
2021-06-17 21:32:24 +00:00
|
|
|
# Force 32-Bit Compile
|
|
|
|
add_compile_options("-m32")
|
2021-10-23 02:39:26 +00:00
|
|
|
elseif((NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm") AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l"))
|
2021-06-17 21:32:24 +00:00
|
|
|
# Use ARM Cross-Compiler
|
2021-09-14 22:10:32 +00:00
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
|
|
|
|
setup_toolchain("arm-linux-gnueabihf")
|
2021-06-17 21:32:24 +00:00
|
|
|
endif()
|
|
|
|
set(CMAKE_SYSTEM_NAME "Linux")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR "arm")
|