minecraft-pi-docker/cmake/arm-toolchain.cmake

12 lines
535 B
CMake
Raw Normal View History

2021-06-17 17:32:24 -04:00
# Compile For ARM
2021-10-28 22:57:47 -04:00
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
if(HOST_ARCHITECTURE STREQUAL "aarch64_be" OR HOST_ARCHITECTURE STREQUAL "aarch64" OR HOST_ARCHITECTURE STREQUAL "armv8b" OR HOST_ARCHITECTURE STREQUAL "armv8l")
2021-06-17 17:32:24 -04:00
# Force 32-Bit Compile
add_compile_options("-m32")
2021-10-28 22:57:47 -04:00
elseif((NOT HOST_ARCHITECTURE STREQUAL "arm") AND (NOT HOST_ARCHITECTURE STREQUAL "armv7l"))
2021-06-17 17:32:24 -04:00
# Use ARM Cross-Compiler
2021-09-14 18:10:32 -04:00
setup_toolchain("arm-linux-gnueabihf")
2021-06-17 17:32:24 -04:00
endif()
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "arm")