-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT: Use reference Yoga CMake build (#1291)
Summary: X-link: facebook/yoga#1291 Pull Request resolved: #37371 **Draft:** This is a draft change that I cannot make a draft in Phabricator because I want to export it to GitHub. This makes React Native use `libyogacore` as provided by Yoga's reference CMake build. This in turn matches Yoga in the OSS RN build to the same compilation settings we use internally. It also means less differences between all the builds (maintainability win). Changelog: [Android][Changed] - Use reference Yoga CMake Build Differential Revision: D45764537 fbshipit-source-id: 6580a7f07120ceebf3c0623e86c1865461af72cc
- Loading branch information
1 parent
3c939e2
commit 6f80a35
Showing
3 changed files
with
36 additions
and
24 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
25 changes: 25 additions & 0 deletions
25
packages/react-native/ReactAndroid/src/main/jni/first-party/yogajni/jni/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,25 @@ | ||
# 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) | ||
project(yogajni) | ||
set(CMAKE_VERBOSE_MAKEFILE on) | ||
|
||
if (NOT DEFINED YOGA_ROOT) | ||
set(YOGA_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..) | ||
endif() | ||
|
||
include(${YOGA_ROOT}/cmake/project-defaults.cmake) | ||
|
||
add_subdirectory(${YOGA_ROOT}/yoga ${CMAKE_CURRENT_BINARY_DIR}/yoga) | ||
|
||
file(GLOB SOURCES CONFIGURE_DEPENDS | ||
${CMAKE_CURRENT_SOURCE_DIR}/jni/*.cpp) | ||
file(GLOB VERSION_SCRIPT CONFIGURE_DEPENDS | ||
${CMAKE_CURRENT_SOURCE_DIR}/yogajni.version) | ||
|
||
add_library(yoga SHARED ${SOURCES}) | ||
target_link_libraries(yoga yogacore) | ||
target_link_options(yoga PRIVATE -Wl,--version-script=${VERSION_SCRIPT}) |
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