Initial commit
This commit is contained in:
2
cmake/zig-ar.cmd
Normal file
2
cmake/zig-ar.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
zig ar %*
|
||||
2
cmake/zig-ar.sh
Executable file
2
cmake/zig-ar.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
zig ar "$@"
|
||||
2
cmake/zig-ranlib.cmd
Normal file
2
cmake/zig-ranlib.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
zig ranlib %*
|
||||
2
cmake/zig-ranlib.sh
Executable file
2
cmake/zig-ranlib.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
zig ranlib "$@"
|
||||
18
cmake/zig-toolchain-aarch64.cmake
Normal file
18
cmake/zig-toolchain-aarch64.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
message(FATAL_ERROR "Visual Studio generator not supported, use: cmake -G Ninja")
|
||||
endif()
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
|
||||
set(CMAKE_C_COMPILER "zig" cc -target aarch64-linux-gnu)
|
||||
set(CMAKE_CXX_COMPILER "zig" c++ -target aarch64-linux-gnu)
|
||||
|
||||
if(WIN32)
|
||||
set(SCRIPT_SUFFIX ".cmd")
|
||||
else()
|
||||
set(SCRIPT_SUFFIX ".sh")
|
||||
endif()
|
||||
|
||||
# This is working (thanks to Simon for finding this trick)
|
||||
set(CMAKE_AR "${CMAKE_CURRENT_LIST_DIR}/zig-ar${SCRIPT_SUFFIX}")
|
||||
set(CMAKE_RANLIB "${CMAKE_CURRENT_LIST_DIR}/zig-ranlib${SCRIPT_SUFFIX}")
|
||||
Reference in New Issue
Block a user