From 75fd9248996caeccccec65da8f6c950c8d440e47 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 15 Nov 2023 18:04:35 +0100 Subject: [PATCH] fix: Fix Frame Processors not building --- package/android/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package/android/CMakeLists.txt b/package/android/CMakeLists.txt index bf660ce..133f0b7 100644 --- a/package/android/CMakeLists.txt +++ b/package/android/CMakeLists.txt @@ -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()