From 5c070abfa691d3c9513bc095a4f5b2738e9b7fed Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 8 Aug 2021 14:35:30 +0800 Subject: [PATCH] Fix android shared loader for openal-soft --- thirdparty/CMakeLists.txt | 6 +++++- thirdparty/SharedLoader.java.in | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 74fa46a398..5cc4464ad2 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -240,7 +240,11 @@ if(BUILD_DEP_ALSOFT) target_link_libraries(thirdparty OpenAL ) - target_compile_definitions(thirdparty PUBLIC DCC_USE_ALSOFT=1) + target_compile_definitions(thirdparty PUBLIC CC_USE_ALSOFT=1) + + if(ANDROID) + set(ANDROID_SHARED_LOADS "${ANDROID_SHARED_LOADS}System.loadLibrary(\"openal\");" CACHE INTERNAL "Android Shared Loads" ) + endif() endif() # The ogg decoder diff --git a/thirdparty/SharedLoader.java.in b/thirdparty/SharedLoader.java.in index 51297851d1..12e090373b 100644 --- a/thirdparty/SharedLoader.java.in +++ b/thirdparty/SharedLoader.java.in @@ -1,5 +1,6 @@ /**************************************************************************** Copyright (c) 2020 c4games.com +Copyright (c) 2021 Bytedance Inc. http://www.cocos2d-x.org