Skip to content

Commit 91c4262

Browse files
authored
fix: support RN 0.76 (#537)
1 parent 7c39106 commit 91c4262

File tree

1 file changed

+31
-19
lines changed

1 file changed

+31
-19
lines changed

android/src/main/jni/CMakeLists.txt

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,37 @@ target_include_directories(
3737
${LIB_ANDROID_GENERATED_COMPONENTS_DIR}
3838
)
3939

40-
target_link_libraries(
41-
${LIB_TARGET_NAME}
42-
fbjni
43-
folly_runtime
44-
glog
45-
jsi
46-
react_codegen_rncore
47-
react_debug
48-
react_nativemodule_core
49-
react_render_core
50-
react_render_debug
51-
react_render_graphics
52-
react_render_mapbuffer
53-
react_render_componentregistry
54-
react_utils
55-
rrc_view
56-
turbomodulejsijni
57-
yoga
58-
)
40+
# https://github.com/react-native-community/discussions-and-proposals/discussions/816
41+
# This if-then-else can be removed once this library does not support version below 0.76
42+
if (REACTNATIVE_MERGED_SO)
43+
target_link_libraries(
44+
${LIB_TARGET_NAME}
45+
fbjni
46+
jsi
47+
reactnative
48+
)
49+
else()
50+
target_link_libraries(
51+
${LIB_TARGET_NAME}
52+
fbjni
53+
folly_runtime
54+
glog
55+
jsi
56+
react_codegen_rncore
57+
react_debug
58+
react_nativemodule_core
59+
react_render_core
60+
react_render_debug
61+
react_render_graphics
62+
react_render_mapbuffer
63+
react_render_componentregistry
64+
react_utils
65+
rrc_view
66+
turbomodulejsijni
67+
yoga
68+
)
69+
endif()
70+
5971

6072
target_compile_options(
6173
${LIB_TARGET_NAME}

0 commit comments

Comments
 (0)