Gate RN_SERIALIZABLE_STATE behind ANDROID flag (#52155)

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

Changelog: [Internal]

Gating RN_SERIALIZABLE_STATE behind ANDROID flag so we can build ReactCommon with cmake when targeting different platforms.
This will help build reac-native-fantom for OSS.

Reviewed By: christophpurrer

Differential Revision: D77034689

fbshipit-source-id: 15f9192c90693f4743f31fcf72f593802b622c47
This commit is contained in:
Andrew Datsenko
2025-06-22 23:48:38 -07:00
committed by Facebook GitHub Bot
parent bc093b8fa9
commit 04da4800da
@@ -28,6 +28,8 @@ SET(reactnative_FLAGS
function(target_compile_reactnative_options target_name scope)
target_compile_options(${target_name} ${scope} ${reactnative_FLAGS})
target_compile_definitions(${target_name} ${scope} RN_SERIALIZABLE_STATE)
# TODO T228344694 improve this so that it works for all platforms
if(ANDROID)
target_compile_definitions(${target_name} ${scope} RN_SERIALIZABLE_STATE)
endif()
endfunction()