Explorar o código

android symbol export for release builds

(cherry picked from commit fe92d0a7bd665d732d81a6a95545d38dcc47776a)
mccakit hai 5 meses
pai
achega
e60acdc477
Modificáronse 2 ficheiros con 11 adicións e 0 borrados
  1. 5 0
      CMakeLists.txt
  2. 6 0
      android-project/android.export.sym

+ 5 - 0
CMakeLists.txt

@@ -1489,6 +1489,11 @@ if(ANDROID)
       endif()
     endif()
   endif()
+  if(TARGET SDL3-shared)
+    target_link_options(SDL3-shared PRIVATE -Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/../android-project/android.export.sym)
+  elseif(TARGET SDL3-static)
+    target_link_options(SDL3-static PRIVATE -Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/../android-project/android.export.sym)
+  endif()
 
 elseif(EMSCRIPTEN)
   # Hide noisy warnings that intend to aid mostly during initial stages of porting a new

+ 6 - 0
android-project/android.export.sym

@@ -0,0 +1,6 @@
+{
+  global:
+    SDL_main;
+    JNI_OnLoad;
+  local: *;
+};