react-native-vision-camera
Version:
VisionCamera is the fastest and most powerful Camera for react-native.
34 lines (27 loc) • 870 B
Plain Text
project(VisionCamera)
cmake_minimum_required(VERSION 3.9.0)
set (PACKAGE_NAME VisionCamera)
set (CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_CXX_STANDARD 20)
# Define C++ library and add all sources
add_library(${PACKAGE_NAME} SHARED
src/main/cpp/cpp-adapter.cpp
src/main/cpp/NativeBufferHelper.cpp
)
# Add Nitrogen specs :)
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/VisionCamera+autolinking.cmake)
# Set up local includes
include_directories(
"src/main/cpp"
"../cpp"
"../cpp/Frame Processors"
)
find_library(LOG_LIB log)
find_package(react-native-nitro-image REQUIRED) # <-- for the HybridImageSpec
# Link all libraries together
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
android # <-- Android core
react-native-nitro-image::NitroImage
)