mirror of
https://github.com/love2d/megasource.git
synced 2026-08-17 19:24:09 +02:00
update SDL3 to libsdl-org/SDL@186c6e5
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
|
||||
This Android archive allows use of @PROJECT_NAME@ in your Android project, without needing to copy any SDL source.
|
||||
This Android archive allows use of @<@PROJECT_NAME@>@ in your Android project, without needing to copy any SDL source.
|
||||
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
|
||||
|
||||
Copy this archive (@PROJECT_NAME@-@PROJECT_VERSION@.aar) to a `app/libs` directory of your project.
|
||||
Copy this archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
|
||||
|
||||
In `app/build.gradle` of your Android project, add:
|
||||
```
|
||||
@@ -13,26 +12,30 @@ android {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation files('libs/@PROJECT_NAME@-@PROJECT_VERSION@.aar')
|
||||
implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar')
|
||||
/* ... */
|
||||
}
|
||||
```
|
||||
|
||||
If you're using CMake, add the following to your CMakeLists.txt:
|
||||
```
|
||||
find_package(@PROJECT_NAME@ REQUIRED CONFIG)
|
||||
target_link_libraries(yourgame PRIVATE @PROJECT_NAME@::@PROJECT_NAME@)
|
||||
find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG)
|
||||
target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@)
|
||||
```
|
||||
|
||||
If you're using ndk-build, add the following somewhere after `LOCAL_MODULE := yourgame` to your `Android.mk` or `Application.mk`:
|
||||
If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
|
||||
```
|
||||
LOCAL_SHARED_LIBARARIES := SDL3 SDL3-Headers
|
||||
```
|
||||
And add the following at the bottom:
|
||||
```
|
||||
# https://google.github.io/prefab/build-systems.html
|
||||
|
||||
# Add the prefab modules to the import path.
|
||||
$(call import-add-path,/out)
|
||||
|
||||
# Import @PROJECT_NAME@ so we can depend on it.
|
||||
$(call import-module,prefab/@PROJECT_NAME@)
|
||||
# Import @<@PROJECT_NAME@>@ so we can depend on it.
|
||||
$(call import-module,prefab/@<@PROJECT_NAME@>@)
|
||||
```
|
||||
|
||||
---
|
||||
@@ -42,7 +45,7 @@ For advanced users:
|
||||
If you want to build a 3rd party library outside Gradle,
|
||||
running the following command will extract the Android archive into a more common directory structure.
|
||||
```
|
||||
python @PROJECT_NAME@-@PROJECT_VERSION@.aar -o android_prefix
|
||||
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
|
||||
```
|
||||
Add `--help` for a list of all available options.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user