|
| 1 | +# Copyright (c) Meta Platforms, Inc. and affiliates. |
| 2 | +# |
| 3 | +# This source code is licensed under the MIT license found in the |
| 4 | +# LICENSE file in the root directory of this source tree. |
| 5 | + |
| 6 | +cmake_minimum_required(VERSION 3.13) |
| 7 | +set(CMAKE_VERBOSE_MAKEFILE on) |
| 8 | + |
| 9 | +project(ReactAndroid) |
| 10 | + |
| 11 | +# Make sure every shared lib includes a .note.gnu.build-id header |
| 12 | +add_link_options(-Wl,--build-id) |
| 13 | +add_compile_options(-Wall -Werror -std=c++1y) |
| 14 | + |
| 15 | +function(add_react_android_subdir relative_path) |
| 16 | + add_subdirectory(${REACT_ANDROID_DIR}/${relative_path} ReactAndroid/${relative_path}) |
| 17 | +endfunction() |
| 18 | + |
| 19 | +function(add_react_third_party_ndk_subdir relative_path) |
| 20 | + add_react_android_subdir(build/third-party-ndk/${relative_path}) |
| 21 | +endfunction() |
| 22 | + |
| 23 | +function(add_react_common_subdir relative_path) |
| 24 | + add_subdirectory(${REACT_COMMON_DIR}/${relative_path} ReactCommon/${relative_path}) |
| 25 | +endfunction() |
| 26 | + |
| 27 | +# Third-party prefabs |
| 28 | +find_package(hermes-engine REQUIRED CONFIG) |
| 29 | + |
| 30 | +# Third-party downloaded targets |
| 31 | +add_react_third_party_ndk_subdir(glog) |
| 32 | +add_react_third_party_ndk_subdir(boost) |
| 33 | +add_react_third_party_ndk_subdir(double-conversion) |
| 34 | +add_react_third_party_ndk_subdir(fmt) |
| 35 | +add_react_third_party_ndk_subdir(libevent) |
| 36 | +add_react_third_party_ndk_subdir(folly) |
| 37 | +add_react_third_party_ndk_subdir(jsc) |
| 38 | + |
| 39 | +# Common targets |
| 40 | +add_react_common_subdir(yoga) |
| 41 | +add_react_common_subdir(runtimeexecutor) |
| 42 | +add_react_common_subdir(reactperflogger) |
| 43 | +add_react_common_subdir(logger) |
| 44 | +add_react_common_subdir(jsiexecutor) |
| 45 | +add_react_common_subdir(cxxreact) |
| 46 | +add_react_common_subdir(jsi) |
| 47 | +add_react_common_subdir(butter) |
| 48 | +add_react_common_subdir(callinvoker) |
| 49 | +add_react_common_subdir(jsinspector) |
| 50 | +add_react_common_subdir(hermes/executor) |
| 51 | +add_react_common_subdir(hermes/inspector) |
| 52 | +add_react_common_subdir(react/renderer/runtimescheduler) |
| 53 | +add_react_common_subdir(react/debug) |
| 54 | +add_react_common_subdir(react/config) |
| 55 | +add_react_common_subdir(react/renderer/animations) |
| 56 | +add_react_common_subdir(react/renderer/attributedstring) |
| 57 | +add_react_common_subdir(react/renderer/componentregistry) |
| 58 | +add_react_common_subdir(react/renderer/mounting) |
| 59 | +add_react_common_subdir(react/renderer/scheduler) |
| 60 | +add_react_common_subdir(react/renderer/telemetry) |
| 61 | +add_react_common_subdir(react/renderer/templateprocessor) |
| 62 | +add_react_common_subdir(react/renderer/uimanager) |
| 63 | +add_react_common_subdir(react/renderer/core) |
| 64 | +add_react_common_subdir(react/renderer/graphics) |
| 65 | +add_react_common_subdir(react/renderer/debug) |
| 66 | +add_react_common_subdir(react/renderer/imagemanager) |
| 67 | +add_react_common_subdir(react/renderer/components/view) |
| 68 | +add_react_common_subdir(react/renderer/components/switch) |
| 69 | +add_react_common_subdir(react/renderer/components/textinput) |
| 70 | +add_react_common_subdir(react/renderer/components/progressbar) |
| 71 | +add_react_common_subdir(react/renderer/components/slider) |
| 72 | +add_react_common_subdir(react/renderer/components/root) |
| 73 | +add_react_common_subdir(react/renderer/components/image) |
| 74 | +add_react_common_subdir(react/renderer/componentregistry/native) |
| 75 | +add_react_common_subdir(react/renderer/components/text) |
| 76 | +add_react_common_subdir(react/renderer/components/unimplementedview) |
| 77 | +add_react_common_subdir(react/renderer/components/modal) |
| 78 | +add_react_common_subdir(react/renderer/components/scrollview) |
| 79 | +add_react_common_subdir(react/renderer/leakchecker) |
| 80 | +add_react_common_subdir(react/renderer/textlayoutmanager) |
| 81 | +add_react_common_subdir(react/utils) |
| 82 | +add_react_common_subdir(react/bridging) |
| 83 | +add_react_common_subdir(react/renderer/mapbuffer) |
| 84 | +add_react_common_subdir(react/nativemodule/core) |
| 85 | + |
| 86 | +# ReactAndroid JNI targets |
| 87 | +add_react_android_subdir(build/generated/source/codegen/jni) |
| 88 | +add_react_android_subdir(src/main/java/com/facebook/hermes/reactexecutor) |
| 89 | +add_react_android_subdir(src/main/jni/first-party/fbjni) |
| 90 | +add_react_android_subdir(src/main/jni/first-party/fb) |
| 91 | +add_react_android_subdir(src/main/jni/first-party/fbgloginit) |
| 92 | +add_react_android_subdir(src/main/jni/first-party/yogajni) |
| 93 | +add_react_android_subdir(src/main/jni/react/jni) |
| 94 | +add_react_android_subdir(src/main/java/com/facebook/react/reactperflogger/jni) |
| 95 | +add_react_android_subdir(src/main/java/com/facebook/react/jscexecutor) |
| 96 | +add_react_android_subdir(src/main/java/com/facebook/react/turbomodule/core/jni) |
| 97 | +add_react_android_subdir(src/main/java/com/facebook/react/uimanager/jni) |
| 98 | +add_react_android_subdir(src/main/java/com/facebook/react/common/mapbuffer/jni) |
| 99 | +add_react_android_subdir(src/main/java/com/facebook/react/fabric/jni) |
| 100 | +add_react_android_subdir(src/main/java/com/facebook/react/modules/blob/jni) |
| 101 | +add_react_android_subdir(src/main/java/com/facebook/hermes/instrumentation/) |
| 102 | + |
0 commit comments