diff --git a/android/src/main/jni/CMakeLists.txt b/android/src/main/jni/CMakeLists.txt index db67583f7..4d1eb1434 100644 --- a/android/src/main/jni/CMakeLists.txt +++ b/android/src/main/jni/CMakeLists.txt @@ -22,7 +22,7 @@ file(GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_COMPONENTS_ add_library( ${LIB_TARGET_NAME} - SHARED + SHARED ${LIB_CUSTOM_SRCS} ${LIB_CODEGEN_SRCS} ) @@ -35,25 +35,34 @@ target_include_directories( ${LIB_ANDROID_GENERATED_COMPONENTS_DIR} ) -target_link_libraries( - ${LIB_TARGET_NAME} - fbjni - folly_runtime - glog - jsi - react_codegen_rncore - react_debug - react_nativemodule_core - react_render_componentregistry - react_utils - react_render_core - react_render_debug - react_render_graphics - react_render_mapbuffer - rrc_view - turbomodulejsijni - yoga -) +if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76) + target_link_libraries( + ${LIB_TARGET_NAME} + ReactAndroid::reactnative + ReactAndroid::jsi + fbjni::fbjni + ) +else() + target_link_libraries( + ${LIB_TARGET_NAME} + fbjni + folly_runtime + glog + jsi + react_codegen_rncore + react_debug + react_nativemodule_core + react_render_componentregistry + react_utils + react_render_core + react_render_debug + react_render_graphics + react_render_mapbuffer + rrc_view + turbomodulejsijni + yoga + ) +endif() target_compile_options( ${LIB_TARGET_NAME}