From 19c47e6b443d313aedbafd72e7b50e258a1d2ba1 Mon Sep 17 00:00:00 2001 From: Louis Gombert Date: Sun, 27 Oct 2024 20:47:11 +0100 Subject: [PATCH] Add CMake preset for ARM64 cross compilation build --- CMakePresets.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 23e5c4a1..50eda7ea 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -42,6 +42,20 @@ "lhs": "${hostSystemName}", "rhs": "Linux" } + }, + { + "name": "linux-cross-arm64", + "inherits": "defaults", + "generator": "Ninja Multi-Config", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "arm64-linux", + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/linux-aarch64-gcc-toolchain.cmake" + } } ], "buildPresets": [ @@ -56,6 +70,10 @@ { "name": "linux", "configurePreset": "linux" + }, + { + "name": "linux-cross-arm64", + "configurePreset": "linux-cross-arm64" } ], "testPresets": [ @@ -85,4 +103,4 @@ "configurePreset": "linux" } ] -} +} \ No newline at end of file