From b999b9cb996be487e15acb196245d623db024b4a Mon Sep 17 00:00:00 2001 From: Pierce Andjelkovic Date: Fri, 25 Jun 2021 04:56:43 +1000 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec5aa331f6..d1d3704429 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,8 @@ if(CMAKE_SYSTEM_PROCESSOR) set(X86_DEVICE ON) elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips") set(MIPS_DEVICE ON) + elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^riscv64") + set(RISCV64_DEVICE ON) else() message("Unknown CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") endif() @@ -113,6 +115,7 @@ endif() option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7_DEVICE}) option(ARM "Set to ON if targeting an ARM processor" ${ARM_DEVICE}) option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS_DEVICE}) +option(RISCV64 "Set to ON if targeting a RISCV64 processor" ${RISCV64_DEVICE}) option(X86 "Set to ON if targeting an X86 processor" ${X86_DEVICE}) option(X86_64 "Set to ON if targeting an X86_64 processor" ${X86_64_DEVICE}) # :: Environments @@ -248,6 +251,9 @@ endif() if(MIPS) message("Generating for MIPS, ${CMAKE_BUILD_TYPE}") endif() +if(RISCV64) + message("Generating for RISCV64, ${CMAKE_BUILD_TYPE}") +endif() if(X86) message("Generating for x86, ${CMAKE_BUILD_TYPE}") endif() @@ -712,6 +718,8 @@ if(USE_FFMPEG) set(PLATFORM_ARCH "linux/arm") elseif(MIPS) set(PLATFORM_ARCH "linux/mips32") + elseif(RISCV64) + set(PLATFORM_ARCH "linux/riscv64") elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) set(PLATFORM_ARCH "linux/x86_64") elseif(X86)