forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move react/fabric/components -> react/cxxcomponents
Summary: This diff moves Component and ComponentManager classes -> react/cxxcomponents. The purpose is to be able to use these classes from any platform, not only Android changelog: [internal] internal Reviewed By: cortinico Differential Revision: D39531533 fbshipit-source-id: 4732aa7bf59d82dae11441212975f0e225c6d458
- Loading branch information
1 parent
c9966e4
commit 85e9b07
Showing
9 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
load( | ||
"//tools/build_defs/oss:rn_defs.bzl", | ||
"ANDROID", | ||
"APPLE", | ||
"CXX", | ||
"react_native_xplat_target", | ||
"rn_xplat_cxx_library", | ||
"subdir_glob", | ||
) | ||
|
||
rn_xplat_cxx_library( | ||
name = "components", | ||
srcs = glob( | ||
["**/*.cpp"], | ||
), | ||
headers = glob( | ||
["**/*.h"], | ||
), | ||
header_namespace = "", | ||
exported_headers = subdir_glob( | ||
[ | ||
("", "**/*.h"), | ||
], | ||
prefix = "react/cxxcomponents", | ||
), | ||
force_static = True, | ||
labels = [ | ||
"pfh:ReactNative_CommonInfrastructurePlaceholder", | ||
"supermodule:xplat/default/public.react_native.infra", | ||
], | ||
platforms = (APPLE, ANDROID, CXX), | ||
preprocessor_flags = [ | ||
"-DLOG_TAG=\"ReactNative\"", | ||
"-DWITH_FBSYSTRACE=1", | ||
], | ||
soname = "libcxxcomponents.$(ext)", | ||
tests = [":tests"], | ||
visibility = ["PUBLIC"], | ||
deps = [ | ||
"//third-party/glog:glog", | ||
"//xplat/fbsystrace:fbsystrace", | ||
"//xplat/folly:memory", | ||
"//xplat/folly:molly", | ||
react_native_xplat_target("react/renderer/core:core"), | ||
], | ||
) |
22 changes: 22 additions & 0 deletions
22
ReactAndroid/src/main/jni/react/cxxcomponents/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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) | ||
|
||
add_compile_options( | ||
-fexceptions | ||
-frtti | ||
-std=c++17 | ||
-Wall | ||
-Wpedantic | ||
-Wno-gnu-zero-variadic-macro-arguments) | ||
|
||
file(GLOB_RECURSE cxxcomponents_SRC CONFIGURE_DEPENDS *.cpp *.h) | ||
|
||
add_library(cxxcomponents SHARED ${cxxcomponents_SRC}) | ||
|
||
target_include_directories(cxxcomponents PUBLIC .) | ||
set_target_properties(cxxcomponents PROPERTIES LINKER_LANGUAGE CXX) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters