diff --git a/Source/ui_android/java/com/virtualapplications/play/InputManager.java b/Source/ui_android/java/com/virtualapplications/play/InputManager.java index d384594b..87a19472 100644 --- a/Source/ui_android/java/com/virtualapplications/play/InputManager.java +++ b/Source/ui_android/java/com/virtualapplications/play/InputManager.java @@ -4,7 +4,7 @@ public class InputManager { static { - System.loadLibrary("PlayCore"); + System.loadLibrary("Play"); } public static native void setButtonState(int button, boolean pressed); diff --git a/Source/ui_android/java/com/virtualapplications/play/NativeInterop.java b/Source/ui_android/java/com/virtualapplications/play/NativeInterop.java index 5cf4c565..d17be2f5 100644 --- a/Source/ui_android/java/com/virtualapplications/play/NativeInterop.java +++ b/Source/ui_android/java/com/virtualapplications/play/NativeInterop.java @@ -7,7 +7,7 @@ public class NativeInterop { static { - System.loadLibrary("PlayCore"); + System.loadLibrary("Play"); } public static native void setFilesDirPath(String dirPath); diff --git a/Source/ui_android/java/com/virtualapplications/play/SettingsManager.java b/Source/ui_android/java/com/virtualapplications/play/SettingsManager.java index aeb701a2..d28411cc 100644 --- a/Source/ui_android/java/com/virtualapplications/play/SettingsManager.java +++ b/Source/ui_android/java/com/virtualapplications/play/SettingsManager.java @@ -4,7 +4,7 @@ public class SettingsManager { static { - System.loadLibrary("PlayCore"); + System.loadLibrary("Play"); } public static native void save(); diff --git a/Source/ui_android/java/com/virtualapplications/play/StatsManager.java b/Source/ui_android/java/com/virtualapplications/play/StatsManager.java index 3aca5bc5..8e44a994 100644 --- a/Source/ui_android/java/com/virtualapplications/play/StatsManager.java +++ b/Source/ui_android/java/com/virtualapplications/play/StatsManager.java @@ -4,7 +4,7 @@ public class StatsManager { static { - System.loadLibrary("PlayCore"); + System.loadLibrary("Play"); } public static native int getFrames(); diff --git a/build_android/build.gradle b/build_android/build.gradle index b5a6b6fd..d2e2801d 100644 --- a/build_android/build.gradle +++ b/build_android/build.gradle @@ -48,7 +48,7 @@ android { arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_STL=c++_static" cppFlags "-frtti" - targets "PlayCore" + targets "Play" } ndk { abiFilters 'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a' diff --git a/build_cmake/CMakeLists.txt b/build_cmake/CMakeLists.txt index b8ae35d8..ab5d7c87 100644 --- a/build_cmake/CMakeLists.txt +++ b/build_cmake/CMakeLists.txt @@ -559,29 +559,14 @@ if(TARGET_PLATFORM_MACOS OR TARGET_PLATFORM_UNIX) set(PLATFORM_SPECIFIC_SRC_FILES ../Source/Posix_VolumeStream.cpp) endif() -if(ANDROID) - set(PLATFORM_SPECIFIC_SRC_FILES - ../Source/ui_android/GSH_OpenGLAndroid.cpp - ../Source/ui_android/InputManager.cpp - ../Source/ui_android/NativeInterop.cpp - ../Source/ui_android/NativeShared.cpp - ../Source/ui_android/SettingsManager.cpp - ../Source/ui_android/SH_OpenSL.cpp - ../Source/ui_android/StatsManager.cpp - ) -endif() - if(OPENAL_FOUND) list(APPEND PLATFORM_SPECIFIC_SRC_FILES ../tools/PsfPlayer/Source/SH_OpenAL.cpp ) endif() -if(ANDROID) - add_library(PlayCore SHARED ${COMMON_SRC_FILES} ${PLATFORM_SPECIFIC_SRC_FILES}) -else() - add_library(PlayCore STATIC ${COMMON_SRC_FILES} ${PLATFORM_SPECIFIC_SRC_FILES}) -endif() +add_library(PlayCore STATIC ${COMMON_SRC_FILES} ${PLATFORM_SPECIFIC_SRC_FILES}) +target_link_libraries(PlayCore Boost::boost) if(NOT ANDROID) if(THREADS_HAVE_PTHREAD_ARG) @@ -589,8 +574,7 @@ if(NOT ANDROID) endif() endif() -target_link_libraries(PlayCore ${PROJECT_LIBS}) -list(APPEND PROJECT_LIBS PlayCore) +list(INSERT PROJECT_LIBS 0 PlayCore) if(TARGET_PLATFORM_UNIX) include_directories( @@ -860,6 +844,23 @@ if(TARGET_PLATFORM_IOS) endif(TARGET_PLATFORM_IOS) +if(TARGET_PLATFORM_ANDROID) + + set(ANDROID_SRC_FILES + ../Source/ui_android/GSH_OpenGLAndroid.cpp + ../Source/ui_android/InputManager.cpp + ../Source/ui_android/NativeInterop.cpp + ../Source/ui_android/NativeShared.cpp + ../Source/ui_android/SettingsManager.cpp + ../Source/ui_android/SH_OpenSL.cpp + ../Source/ui_android/StatsManager.cpp + ) + + add_library(Play SHARED ${ANDROID_SRC_FILES}) + target_link_libraries(Play ${PROJECT_LIBS}) + +endif(TARGET_PLATFORM_ANDROID) + if(TARGET_PLATFORM_WIN32) ENABLE_LANGUAGE(ASM_MASM)