Attempt to cross-compile for arm64 Linux

This commit is contained in:
Siarhei Fedartsou 2022-10-15 15:30:55 +02:00
parent 9feecad226
commit 5870ca658d

View File

@ -518,8 +518,8 @@ if(ENABLE_CONAN)
# explicitly say Conan to use x86 dependencies if build for x86 platforms (https://github.com/conan-io/cmake-conan/issues/141) # explicitly say Conan to use x86 dependencies if build for x86 platforms (https://github.com/conan-io/cmake-conan/issues/141)
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
conan_cmake_run("${CONAN_ARGS};ARCH;x86") conan_cmake_run("${CONAN_ARGS};ARCH;x86")
# cross-compilation for Apple Silicon # cross-compilation for arm64 processors
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") elseif((CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
conan_cmake_run("${CONAN_ARGS};ARCH;armv8") conan_cmake_run("${CONAN_ARGS};ARCH;armv8")
else() else()
conan_cmake_run("${CONAN_ARGS}") conan_cmake_run("${CONAN_ARGS}")