cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) # 设置编译选项 add_compile_options( -fexceptions -frtti -std=c++17 -Wall ) # 获取React Native目录 file(GLOB LIBRN_DIR "${REACT_ANDROID_DIR}") # 包含目录 target_include_directories( ${CMAKE_PROJECT_NAME} PRIVATE "${LIBRN_DIR}/ReactAndroid/src/main/jni/first-party/fbjni/headers" "${LIBRN_DIR}/ReactCommon" "${LIBRN_DIR}/ReactCommon/callinvoker" "${LIBRN_DIR}/ReactCommon/runtimeexecutor" "${LIBRN_DIR}/ReactCommon/jsi" ) # 查找库 find_library(LOG_LIB log) # 链接库 target_link_libraries( ${CMAKE_PROJECT_NAME} ${LOG_LIB} android )