diff --git a/renderdoccmd/CMakeLists.txt b/renderdoccmd/CMakeLists.txt index bfa10de74..137c3bcee 100644 --- a/renderdoccmd/CMakeLists.txt +++ b/renderdoccmd/CMakeLists.txt @@ -11,7 +11,8 @@ endif() if(APPLE) list(APPEND sources renderdoccmd_apple.cpp) elseif(ANDROID) - list(APPEND sources renderdoccmd_android.cpp) + string(REPLACE "\\" "/" GLUE_SOURCE "${ANDROID_NDK_ROOT_PATH}/sources/android/native_app_glue/android_native_app_glue.c") + list(APPEND sources renderdoccmd_android.cpp "${GLUE_SOURCE}") include_directories(${ANDROID_NDK_ROOT_PATH}/sources/android/native_app_glue) list(APPEND libraries PRIVATE -llog -landroid) set(LINKER_FLAGS "-Wl,--no-as-needed") diff --git a/renderdoccmd/renderdoccmd_android.cpp b/renderdoccmd/renderdoccmd_android.cpp index 46c47646c..98f2399c1 100644 --- a/renderdoccmd/renderdoccmd_android.cpp +++ b/renderdoccmd/renderdoccmd_android.cpp @@ -33,10 +33,6 @@ #include #include -#define ANativeActivity_onCreate __attribute__((visibility("default"))) ANativeActivity_onCreate -extern "C" { -#include -} #include #define ANDROID_LOG(...) __android_log_print(ANDROID_LOG_INFO, "renderdoccmd", __VA_ARGS__);