File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,18 @@ include(${EXECUTORCH_ROOT}/build/Utils.cmake)
21
21
set (_common_compile_options -Wno-deprecated-declarations -fPIC )
22
22
set (_common_include_directories ${EXECUTORCH_ROOT} /.. )
23
23
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!
24
32
if (NOT FBJNI_VERSION )
25
33
set (FBJNI_VERSION 0.5.1 )
26
34
endif ()
35
+
27
36
set (FBJNI_AAR_URL https://repo1.maven.org/maven2/com/facebook/fbjni/fbjni/${FBJNI_VERSION}/fbjni-${FBJNI_VERSION}.aar )
28
37
set (FBJNI_DOWNLOAD_PATH ${CMAKE_CURRENT_BINARY_DIR} /third-party/fbjni/fbjni.aar )
29
38
@@ -46,9 +55,6 @@ add_dependencies(fbjni fbjni_prefab)
46
55
set_target_properties (fbjni PROPERTIES
47
56
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR} /third-party/fbjni/prefab/modules/fbjni/libs/android.${ANDROID_ABI} /libfbjni.so"
48
57
)
49
- list (APPEND
50
- _common_include_directories
51
- )
52
58
53
59
set (executorch_DIR ${CMAKE_CURRENT_BINARY_DIR} /../../lib/cmake/ExecuTorch )
54
60
find_package (executorch CONFIG REQUIRED )
You can’t perform that action at this time.
0 commit comments