This commit is contained in:
kornerr committed 2026-11-06 22:34:42 +03:00
1 parent 67d5c41426
commit 5751f4a165
2 files changed
+8 -4

No files matched your search

+3 -1
View File
@@ -300,7 +300,9 @@ to the official raylib tag. Gradle passes it to CMake as
its build directory, retaining the upstream license. No environment variable or
generated revision file is needed; preparation only generates Dialect sources.
It links `GLESv3`, `log` and `m`; Gradle pins NDK `28.2.13676358` and CMake
`3.22.1` and packages `libraybri.so`. Kotlin JNI declarations link to
`3.22.1` and packages `libraybri.so`; CMakeLists declares a minimum of `3.11.0`
and uses `FetchContent_Populate`, which is available in that version.
Kotlin JNI declarations link to
`components/raybri/android/raybri.kt`. Do not call them until a GL context is
current. These are top-level `raybriInit`, `raybriRender` and `raybriShutdown`
functions, matching the Swift-facing C names. Kotlin's generated `RaybriKt` class
@@ -1,20 +1,22 @@
cmake_minimum_required(VERSION 3.22.1)
cmake_minimum_required(VERSION 3.11.0)
project(raybri LANGUAGES C)
include(FetchContent)
set(RLGL_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/rlgl")
FetchContent_Declare(rlgl
URL "https://raw.githubusercontent.com/raysan5/raylib/${RAYLIB_REVISION}/src/rlgl.h"
DOWNLOAD_DIR "${RLGL_INCLUDE_DIR}"
DOWNLOAD_NO_EXTRACT TRUE
TLS_VERIFY TRUE
)
FetchContent_MakeAvailable(rlgl)
FetchContent_Populate(rlgl)
add_library(raybri SHARED app/src/main/c/raybri.c)
target_compile_features(raybri PRIVATE c_std_99)
target_compile_definitions(raybri PRIVATE GRAPHICS_API_OPENGL_ES3)
target_include_directories(raybri PRIVATE
app/src/main/c
"${rlgl_SOURCE_DIR}"
"${RLGL_INCLUDE_DIR}"
)
target_link_libraries(raybri PRIVATE GLESv3 log m)