master #2

Merged
NoozAbooz merged 28 commits from minecraft-pi-reborn/minecraft-pi-reborn:master into master 2021-11-12 16:07:02 +00:00
4 changed files with 11 additions and 7 deletions
Showing only changes of commit 05587efc04 - Show all commits

View File

@ -1,10 +1,10 @@
# Compile For ARM
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")
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")
# Force 32-Bit Compile
add_compile_options("-m32")
elseif((NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm") AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l"))
elseif((NOT HOST_ARCHITECTURE STREQUAL "arm") AND (NOT HOST_ARCHITECTURE STREQUAL "armv7l"))
# Use ARM Cross-Compiler
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
setup_toolchain("arm-linux-gnueabihf")
endif()
set(CMAKE_SYSTEM_NAME "Linux")

View File

@ -1,7 +1,7 @@
# Compile For ARM64
if(NOT (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"))
# Use ARM64 Cross-Compiler
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
if(NOT (HOST_ARCHITECTURE STREQUAL "aarch64_be" OR HOST_ARCHITECTURE STREQUAL "aarch64" OR HOST_ARCHITECTURE STREQUAL "armv8b" OR HOST_ARCHITECTURE STREQUAL "armv8l"))
# Use ARM64 Cross-Compiler
setup_toolchain("aarch64-linux-gnu")
endif()
set(CMAKE_SYSTEM_NAME "Linux")

View File

@ -1,3 +1,7 @@
# Get Host Architecture
find_program(UNAME uname /bin /usr/bin /usr/local/bin REQUIRED)
execute_process(COMMAND "${UNAME}" "-m" OUTPUT_VARIABLE HOST_ARCHITECTURE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
# Pick GCC Version
macro(pick_gcc_version gcc_root gcc_version)
file(GLOB children RELATIVE "${gcc_root}" "${gcc_root}/*")

View File

@ -1,7 +1,7 @@
# Compile For x86_64
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
# Use x86_64 Cross-Compiler
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
if(NOT HOST_ARCHITECTURE STREQUAL "x86_64")
# Use x86_64 Cross-Compiler
setup_toolchain("x86_64-linux-gnu")
endif()
set(CMAKE_SYSTEM_NAME "Linux")