From cd5d0ede440aff1fcb44121a21c088b77ec64285 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 30 Mar 2021 06:24:48 -0700 Subject: [PATCH] RenderdocCmd: add x86/x86_64 support for APKs This commit adds x86/x86_64 support for RenderdocCmd APKs for Android. This is needed mostly to support Chromebook devices. Many of them are based on x86_64 CPUs. --- renderdoccmd/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/renderdoccmd/CMakeLists.txt b/renderdoccmd/CMakeLists.txt index 29036f346..768a6bbd6 100644 --- a/renderdoccmd/CMakeLists.txt +++ b/renderdoccmd/CMakeLists.txt @@ -16,7 +16,7 @@ elseif(ANDROID) include_directories(${ANDROID_NDK_ROOT_PATH}/sources/android/native_app_glue) list(APPEND libraries PRIVATE -llog -landroid) set(LINKER_FLAGS "-Wl,--no-as-needed") - + set_source_files_properties(renderdoccmd.cpp PROPERTIES COMPILE_FLAGS "-fexceptions -frtti") set_source_files_properties(renderdoccmd_android.cpp PROPERTIES COMPILE_FLAGS "-fexceptions") elseif(ENABLE_GGP) @@ -103,7 +103,7 @@ if(ANDROID) unset(__buildTools) endif() message(STATUS "Using Android build-tools version ${ANDROID_BUILD_TOOLS_VERSION}") - + set(APK_TARGET_ID "" CACHE STRING "The Target ID to build the APK for like 'android-99', use to choose another one.") if(APK_TARGET_ID STREQUAL "") # This seems different from the platform we're targetting, @@ -168,6 +168,10 @@ if(ANDROID) set(RENDERDOC_ANDROID_PACKAGE_NAME "org.renderdoc.renderdoccmd.arm32") elseif(ANDROID_ABI STREQUAL "arm64-v8a") set(RENDERDOC_ANDROID_PACKAGE_NAME "org.renderdoc.renderdoccmd.arm64") + elseif(ANDROID_ABI STREQUAL "x86") + set(RENDERDOC_ANDROID_PACKAGE_NAME "org.renderdoc.renderdoccmd.x86") + elseif(ANDROID_ABI STREQUAL "x86_64") + set(RENDERDOC_ANDROID_PACKAGE_NAME "org.renderdoc.renderdoccmd.x64") else() message(FATAL_ERROR "ABI ${ANDROID_ABI} is not supported.") endif()