mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 08:56:59 +01:00
added android client
This commit is contained in:
1 parent
8b95cf7a05
commit
6db6909824
73 files changed
+9234
-106
No files matched your search
@@ -0,0 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.22.1)
|
||||
project(pstr_mpv LANGUAGES CXX)
|
||||
|
||||
if(NOT DEFINED PSTR_MPV_ROOT)
|
||||
message(FATAL_ERROR "PSTR_MPV_ROOT must point at the staged Android libmpv tree")
|
||||
endif()
|
||||
if(NOT DEFINED PSTR_RUST_JNI_ROOT)
|
||||
message(FATAL_ERROR "PSTR_RUST_JNI_ROOT must point at cargo-ndk output")
|
||||
endif()
|
||||
|
||||
add_library(pstr_mpv SHARED pstr_mpv.cpp)
|
||||
add_library(mpv SHARED IMPORTED)
|
||||
set_target_properties(mpv PROPERTIES
|
||||
IMPORTED_LOCATION "${PSTR_MPV_ROOT}/jniLibs/${ANDROID_ABI}/libmpv.so")
|
||||
|
||||
target_compile_features(pstr_mpv PRIVATE cxx_std_20)
|
||||
target_compile_options(pstr_mpv PRIVATE -Wall -Wextra -Werror)
|
||||
target_include_directories(pstr_mpv PRIVATE "${PSTR_MPV_ROOT}/include")
|
||||
# Link by soname rather than by absolute build path. Both libraries are
|
||||
# packaged into the same ABI directory in the APK.
|
||||
target_link_directories(pstr_mpv PRIVATE "${PSTR_RUST_JNI_ROOT}/${ANDROID_ABI}")
|
||||
target_link_options(pstr_mpv PRIVATE "-Wl,-l:libpstr_android.so")
|
||||
target_link_libraries(pstr_mpv PRIVATE mpv android EGL log)
|
||||
Reference in new issue
Block a user