Enable prefab for fbjni integration (#1941)
Summary: I'm in the progress of releasing a prefab-enabled FBJNI release. This dramatically reduces the hackery around integrating with separately released native libraries. This will fail until the release is actually out. Pull Request resolved: https://github.com/facebook/flipper/pull/1941 Test Plan: `./gradlew :sample:installDebug` works as before. Once the release is out, we need to check if this creates any problems with RN but because we advice to exclude the dependency, I expect it not to cause any trouble. Reviewed By: mweststrate Differential Revision: D26545104 Pulled By: passy fbshipit-source-id: 1e21fa1816f28e2fcb52da68863fabc8bc625136
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fa3ff83595
commit
3d2a0e3eb2
@@ -49,18 +49,12 @@ set(libflipper_build_DIR ${build_DIR}/libflipper/${ANDROID_ABI})
|
||||
set(libfolly_build_DIR ${build_DIR}/libfolly/${ANDROID_ABI})
|
||||
|
||||
file(MAKE_DIRECTORY ${build_DIR})
|
||||
file(GLOB libfbjni_link_DIRS "${build_DIR}/fbjni*/jni/${ANDROID_ABI}")
|
||||
file(GLOB libfbjni_include_DIRS "${build_DIR}/fbjni-*-headers.jar/")
|
||||
|
||||
# Without NO_CMAKE_FIND_ROOT_PATH, this will for some bizarre reason only look
|
||||
# in the NDK folder.
|
||||
find_library(FBJNI_LIBRARY fbjni PATHS ${libfbjni_link_DIRS} NO_CMAKE_FIND_ROOT_PATH)
|
||||
find_package(fbjni REQUIRED CONFIG)
|
||||
|
||||
add_subdirectory(${libflipper_DIR} ${libflipper_build_DIR})
|
||||
|
||||
target_include_directories(${PACKAGE_NAME} PRIVATE
|
||||
${libjnihack_DIR}
|
||||
${libfbjni_include_DIRS}
|
||||
${libflipper_DIR}
|
||||
${libfolly_DIR}
|
||||
${glog_DIR}
|
||||
@@ -73,4 +67,4 @@ target_include_directories(${PACKAGE_NAME} PRIVATE
|
||||
${LIBEVENT_DIR}/include/event2
|
||||
)
|
||||
|
||||
target_link_libraries(${PACKAGE_NAME} ${FBJNI_LIBRARY} flippercpp)
|
||||
target_link_libraries(${PACKAGE_NAME} fbjni::fbjni flippercpp)
|
||||
|
||||
Reference in New Issue
Block a user