Skip to content

Commit 49b67c3

Browse files
feat: Add support for react-native 0.76.0 (#588)
1 parent 93c30bb commit 49b67c3

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

android/src/main/jni/CMakeLists.txt

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ file(GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_COMPONENTS_
2222

2323
add_library(
2424
${LIB_TARGET_NAME}
25-
SHARED
25+
SHARED
2626
${LIB_CUSTOM_SRCS}
2727
${LIB_CODEGEN_SRCS}
2828
)
@@ -35,25 +35,34 @@ target_include_directories(
3535
${LIB_ANDROID_GENERATED_COMPONENTS_DIR}
3636
)
3737

38-
target_link_libraries(
39-
${LIB_TARGET_NAME}
40-
fbjni
41-
folly_runtime
42-
glog
43-
jsi
44-
react_codegen_rncore
45-
react_debug
46-
react_nativemodule_core
47-
react_render_componentregistry
48-
react_utils
49-
react_render_core
50-
react_render_debug
51-
react_render_graphics
52-
react_render_mapbuffer
53-
rrc_view
54-
turbomodulejsijni
55-
yoga
56-
)
38+
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
39+
target_link_libraries(
40+
${LIB_TARGET_NAME}
41+
ReactAndroid::reactnative
42+
ReactAndroid::jsi
43+
fbjni::fbjni
44+
)
45+
else()
46+
target_link_libraries(
47+
${LIB_TARGET_NAME}
48+
fbjni
49+
folly_runtime
50+
glog
51+
jsi
52+
react_codegen_rncore
53+
react_debug
54+
react_nativemodule_core
55+
react_render_componentregistry
56+
react_utils
57+
react_render_core
58+
react_render_debug
59+
react_render_graphics
60+
react_render_mapbuffer
61+
rrc_view
62+
turbomodulejsijni
63+
yoga
64+
)
65+
endif()
5766

5867
target_compile_options(
5968
${LIB_TARGET_NAME}

0 commit comments

Comments
 (0)