Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup CMakeLists.txt #492

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions android/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@ find_package(fbjni REQUIRED CONFIG)
find_package(ReactAndroid REQUIRED CONFIG)
find_package(hermes-engine REQUIRED CONFIG)

target_link_libraries(
${CMAKE_PROJECT_NAME}
fbjni::fbjni
hermes-engine::libhermes
ReactAndroid::jsi
)

if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(${CMAKE_PROJECT_NAME}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::reactnative
hermes-engine::libhermes
)
target_link_libraries(${CMAKE_PROJECT_NAME} ReactAndroid::reactnative)
elseif (ReactAndroid_VERSION_MINOR GREATER_EQUAL 75)
target_link_libraries(${CMAKE_PROJECT_NAME}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::reactnativejni
hermes-engine::libhermes
)
target_link_libraries(${CMAKE_PROJECT_NAME} ReactAndroid::reactnativejni)
else ()
message(FATAL_ERROR "react-native-live-markdown requires react-native 0.75 or newer.")
endif ()
58 changes: 25 additions & 33 deletions android/src/main/new_arch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,43 @@ target_include_directories(
${LIB_CPP_DIR}
)

find_package(fbjni REQUIRED CONFIG)
find_package(ReactAndroid REQUIRED CONFIG)

target_link_libraries(
${LIB_TARGET_NAME}
fbjni::fbjni
ReactAndroid::jsi
)

if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
${LIB_TARGET_NAME}
ReactAndroid::reactnative
ReactAndroid::jsi
fbjni::fbjni
)
elseif (ReactAndroid_VERSION_MINOR GREATER_EQUAL 75)
target_link_libraries(
${LIB_TARGET_NAME}
ReactAndroid::rrc_text
ReactAndroid::rrc_textinput
ReactAndroid::react_render_textlayoutmanager
ReactAndroid::fabricjni
ReactAndroid::folly_runtime
ReactAndroid::glog
ReactAndroid::react_debug
ReactAndroid::react_nativemodule_core
ReactAndroid::react_performance_timeline
ReactAndroid::react_render_consistency
ReactAndroid::react_render_core
ReactAndroid::react_render_debug
ReactAndroid::react_render_graphics
ReactAndroid::react_render_imagemanager
ReactAndroid::react_render_mapbuffer
ReactAndroid::react_render_observers_events
ReactAndroid::react_render_textlayoutmanager
ReactAndroid::reactnativejni
ReactAndroid::mapbufferjni
fabricjni
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_core
react_render_debug
react_render_graphics
react_render_mapbuffer
ReactAndroid::react_render_uimanager
ReactAndroid::react_render_scheduler
react_utils
runtimeexecutor
rrc_view
turbomodulejsijni
yoga
android
log
mapbufferjni
reactnativejni
react_render_consistency
react_performance_timeline
react_render_observers_events
react_featureflags
ReactAndroid::rrc_text
ReactAndroid::rrc_textinput
ReactAndroid::rrc_view
ReactAndroid::runtimeexecutor
ReactAndroid::yoga
)
else ()
message(FATAL_ERROR "react-native-live-markdown requires react-native 0.75 or newer.")
Expand Down
Loading