fix: Fix Frame Processors not building

This commit is contained in:
Marc Rousavy 2023-11-15 18:04:35 +01:00
parent e795ea19b1
commit 75fd924899
No known key found for this signature in database
GPG Key ID: 8B9C709EA0B16A6D

View File

@ -12,7 +12,11 @@ find_package(ReactAndroid REQUIRED CONFIG)
find_package(fbjni REQUIRED CONFIG)
find_library(LOG_LIB log)
add_definitions(-DVISION_CAMERA_ENABLE_FRAME_PROCESSORS=${ENABLE_FRAME_PROCESSORS})
if (ENABLE_FRAME_PROCESSORS)
add_definitions(-DVISION_CAMERA_ENABLE_FRAME_PROCESSORS=true)
else()
add_definitions(-DVISION_CAMERA_ENABLE_FRAME_PROCESSORS=false)
endif()
# Add react-native-vision-camera sources
@ -63,11 +67,12 @@ target_link_libraries(
)
# Optionally also add Frame Processors here
if(ENABLE_FRAME_PROCESSORS)
message("VisionCamera: Frame Processors: ${ENABLE_FRAME_PROCESSORS}!")
if (ENABLE_FRAME_PROCESSORS)
message("VisionCamera: Linking react-native-worklets...")
find_package(react-native-worklets-core REQUIRED CONFIG)
target_link_libraries(
${PACKAGE_NAME}
react-native-worklets-core::rnworklets
)
message("VisionCamera: Frame Processors enabled!")
endif()