Skip to content

Commit 50dcb3b

Browse files
authored
Update docs
1 parent 6697d38 commit 50dcb3b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

extension/android/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@ include(${EXECUTORCH_ROOT}/build/Utils.cmake)
2121
set(_common_compile_options -Wno-deprecated-declarations -fPIC)
2222
set(_common_include_directories ${EXECUTORCH_ROOT}/..)
2323

24+
# We need to download fbjni library from maven, and use its "prefab" library
25+
# and headers, and link executorch library against that fbjni library.
26+
# We don't know which NDK is used to compile fbjni, and we need to link our
27+
# executorch library to the version which Android APK links against for runtime
28+
# to ensure the libc++ dependencies are consistent.
29+
# WARNING #
30+
# Users need to use the SAME fbjni version here and in app gradle dependency
31+
# for runtime compatibility!
2432
if(NOT FBJNI_VERSION)
2533
set(FBJNI_VERSION 0.5.1)
2634
endif()
35+
2736
set(FBJNI_AAR_URL https://repo1.maven.org/maven2/com/facebook/fbjni/fbjni/${FBJNI_VERSION}/fbjni-${FBJNI_VERSION}.aar)
2837
set(FBJNI_DOWNLOAD_PATH ${CMAKE_CURRENT_BINARY_DIR}/third-party/fbjni/fbjni.aar)
2938

@@ -46,9 +55,6 @@ add_dependencies(fbjni fbjni_prefab)
4655
set_target_properties(fbjni PROPERTIES
4756
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/third-party/fbjni/prefab/modules/fbjni/libs/android.${ANDROID_ABI}/libfbjni.so"
4857
)
49-
list(APPEND
50-
_common_include_directories
51-
)
5258

5359
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../lib/cmake/ExecuTorch)
5460
find_package(executorch CONFIG REQUIRED)

0 commit comments

Comments
 (0)