From f04d1f1ef79a11223169f33c405cf010357e2774 Mon Sep 17 00:00:00 2001 From: Andrew Datsenko Date: Sun, 22 Jun 2025 23:48:38 -0700 Subject: [PATCH] Add react_cxx_platform_react_runtime cmake (#52178) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52178 Changelog: [Internal] Add cmake lib react_cxx_platform_react_runtime Reviewed By: christophpurrer Differential Revision: D77038450 fbshipit-source-id: 54515f1aff84632c8a86abd8970107a1bd8ca043 --- .../react/runtime/CMakeLists.txt | 52 +++++++++++++++++++ .../runtime}/PlatformTimerRegistryImpl.cpp | 0 .../runtime}/PlatformTimerRegistryImpl.h | 0 3 files changed, 52 insertions(+) create mode 100644 packages/react-native/ReactCxxPlatform/react/runtime/CMakeLists.txt rename packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/{ => react/runtime}/PlatformTimerRegistryImpl.cpp (100%) rename packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/{ => react/runtime}/PlatformTimerRegistryImpl.h (100%) diff --git a/packages/react-native/ReactCxxPlatform/react/runtime/CMakeLists.txt b/packages/react-native/ReactCxxPlatform/react/runtime/CMakeLists.txt new file mode 100644 index 00000000000..6ad3a4975c4 --- /dev/null +++ b/packages/react-native/ReactCxxPlatform/react/runtime/CMakeLists.txt @@ -0,0 +1,52 @@ +# 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) + +include(${REACT_COMMON_DIR}/cmake-utils/react-native-flags.cmake) + +file(GLOB react_cxx_platform_react_runtime_SRC CONFIGURE_DEPENDS *.cpp platform/cxx/react/runtime/*.cpp) +add_library(react_cxx_platform_react_runtime OBJECT ${react_cxx_platform_react_runtime_SRC}) + +target_include_directories(react_cxx_platform_react_runtime + PUBLIC + ${REACT_CXX_PLATFORM_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/platform/cxx/) + +target_link_libraries(react_cxx_platform_react_runtime + bridgeless + bridgelesshermes + callinvoker + glog + jserrorhandler + jsinspector + react_codegen_rncore + react_cxx_platform_react_coremodules + react_cxx_platform_react_devsupport + react_cxx_platform_react_devsupport + react_cxx_platform_react_http + react_cxx_platform_react_io + react_cxx_platform_react_logging + react_cxx_platform_react_nativemodule + react_cxx_platform_react_renderer_animated + react_cxx_platform_react_renderer_uimanager + react_cxx_platform_react_threading + react_cxx_platform_react_utils + react_cxxreact + react_debug + react_nativemodule_core + react_nativemodule_defaults + react_nativemodule_intersectionobserver + react_nativemodule_mutationobserver + react_nativemodule_webperformance + react_renderer_graphics + react_renderer_runtimescheduler + react_renderer_scheduler + rrc_native + rrc_view +) +target_compile_reactnative_options(react_cxx_platform_react_runtime PRIVATE) +target_compile_options(react_cxx_platform_react_runtime PRIVATE -Wpedantic -Wno-deprecated-declarations) diff --git a/packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/PlatformTimerRegistryImpl.cpp b/packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/react/runtime/PlatformTimerRegistryImpl.cpp similarity index 100% rename from packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/PlatformTimerRegistryImpl.cpp rename to packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/react/runtime/PlatformTimerRegistryImpl.cpp diff --git a/packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/PlatformTimerRegistryImpl.h b/packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/react/runtime/PlatformTimerRegistryImpl.h similarity index 100% rename from packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/PlatformTimerRegistryImpl.h rename to packages/react-native/ReactCxxPlatform/react/runtime/platform/cxx/react/runtime/PlatformTimerRegistryImpl.h