CMake setup for ReactAndroid (#33472)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33472

Changes native build of ReactAndroid to CMake instead of ndk-build. Removes a few workarounds around AGP issues with ndk-build which seems to be working with CMake by default.

Changelog: [Changed][Android] - Use CMake to build ReactAndroid module

Reviewed By: cortinico

Differential Revision: D35018803

fbshipit-source-id: af477937ed70a5ddfafef4e6260a397ee9911580
This commit is contained in:
Andrei Shikov
2022-03-23 11:18:54 -07:00
committed by Facebook GitHub Bot
parent 1907bd31f0
commit e3830ddffd
5 changed files with 173 additions and 41 deletions
@@ -0,0 +1,31 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
file(GLOB_RECURSE jsijniprofiler_SRC CONFIGURE_DEPENDS *.cpp)
add_library(
jsijniprofiler
SHARED
${jsijniprofiler_SRC}
)
target_compile_options(
jsijniprofiler
PRIVATE
-fexceptions
)
target_include_directories(jsijniprofiler PRIVATE .)
target_link_libraries(
jsijniprofiler
fb
fbjni
jsireact
folly_runtime
hermes-engine::libhermes
jsi
reactnativejni
)