mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Compile android_native_app_glue.c as C
* It doesn't compile as C++ in latest compilers so we can't include it in-line in the C++ source
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
#include <string>
|
||||
|
||||
#include <android_native_app_glue.h>
|
||||
#define ANativeActivity_onCreate __attribute__((visibility("default"))) ANativeActivity_onCreate
|
||||
extern "C" {
|
||||
#include <android_native_app_glue.c>
|
||||
}
|
||||
|
||||
#include <android/log.h>
|
||||
#define ANDROID_LOG(...) __android_log_print(ANDROID_LOG_INFO, "renderdoccmd", __VA_ARGS__);
|
||||
|
||||
Reference in New Issue
Block a user