respect frame processor flag when compiling and force 16kb page alignment

This commit is contained in:
2025-12-01 11:24:24 -07:00
parent 35d80b13d6
commit f055119735

View File

@@ -19,9 +19,7 @@ endif()
# Add react-native-vision-camera sources
add_library(
${PACKAGE_NAME}
SHARED
set(SOURCES
# Shared C++
../cpp/MutableRawBuffer.cpp
# Java JNI
@@ -31,7 +29,11 @@ add_library(
src/main/cpp/OpenGLContext.cpp
src/main/cpp/OpenGLRenderer.cpp
src/main/cpp/MutableJByteBuffer.cpp
# Frame Processor
)
# Only add Frame Processor sources if enabled
if (ENABLE_FRAME_PROCESSORS)
list(APPEND SOURCES
src/main/cpp/frameprocessor/FrameHostObject.cpp
src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.cpp
src/main/cpp/frameprocessor/JSIJNIConversion.cpp
@@ -43,6 +45,18 @@ add_library(
src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.cpp
src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.cpp
)
endif()
add_library(
${PACKAGE_NAME}
SHARED
${SOURCES}
)
# Force 16KB page alignment for Android 15+ compatibility
set_target_properties(${PACKAGE_NAME} PROPERTIES
LINK_FLAGS "-Wl,-z,max-page-size=16384"
)
# Header Search Paths (includes)
target_include_directories(