mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
[Android] Enable the usage of debug version of SFML libraries (#643)
This commit is contained in:
parent
214c9b0662
commit
a4846db016
@ -55,4 +55,60 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-system-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-system-d.so
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-window-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-window-d.so
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_EXPORT_LDLIBS := -lEGL -llog -landroid
|
||||
LOCAL_SHARED_LIBRARIES := sfml-system-d
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-graphics-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-graphics-d.so
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_SHARED_LIBRARIES += sfml-system-d sfml-window-d
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-audio-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-audio-d.so
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_SHARED_LIBRARIES := sfml-window-d sfml-system-d openal sndfile
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-network-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-network-d.so
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_SHARED_LIBRARIES := sfml-system-d
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-main-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-main-d.a
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_SHARED_LIBRARIES := sfml-window-d sfml-system-d
|
||||
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sfml-activity-d
|
||||
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-activity-d.so
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
$(call import-module,sfml/extlibs)
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#include <SFML/Config.hpp>
|
||||
#include <string>
|
||||
#include <android/native_activity.h>
|
||||
#include <android/log.h>
|
||||
@ -161,13 +162,22 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_
|
||||
|
||||
// Load our libraries in reverse order
|
||||
loadLibrary("c++_shared", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sndfile", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("openal", lJNIEnv, ObjectActivityInfo);
|
||||
|
||||
#if !defined(SFML_DEBUG)
|
||||
loadLibrary("sfml-system", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-window", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-graphics", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sndfile", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("openal", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-audio", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-network", lJNIEnv, ObjectActivityInfo);
|
||||
#else
|
||||
loadLibrary("sfml-system-d", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-window-d", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-graphics-d", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-audio-d", lJNIEnv, ObjectActivityInfo);
|
||||
loadLibrary("sfml-network-d", lJNIEnv, ObjectActivityInfo);
|
||||
#endif
|
||||
|
||||
std::string libName = getLibraryName(lJNIEnv, ObjectActivityInfo);
|
||||
void* handle = loadLibrary(libName.c_str(), lJNIEnv, ObjectActivityInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user