Files
react-native/packages/react-native/ReactCommon/React-FabricImage.podspec
T
Oskar Kwaśniewski e7de582798 feat(iOS): centralize JS engine dependency configuration (#49297)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR centralizes the setup of js engine dependencies which need to be defined when building with dynamic frameworks. This will allow us to change linked framework if using a third party one in the future

## Changelog:

[INTERNAL] [CHANGED] - centralize JS engine dependency configuration

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

Test Plan: CI Green (Build needs to go properly)

Reviewed By: javache

Differential Revision: D69396641

Pulled By: cipolleschi

fbshipit-source-id: deedd12084f563f73f12f8617fdca0a6d680bf5a
2025-02-11 10:03:07 -08:00

99 lines
3.6 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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.
require "json"
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
version = package['version']
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which were presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
folly_config = get_folly_config()
folly_compiler_flags = folly_config[:compiler_flags]
folly_version = folly_config[:version]
folly_dep_name = folly_config[:dep_name]
boost_config = get_boost_config()
boost_compiler_flags = boost_config[:compiler_flags]
react_native_path = ".."
header_search_path = [
"\"$(PODS_ROOT)/boost\"",
"\"$(PODS_TARGET_SRCROOT)/ReactCommon\"",
"\"$(PODS_ROOT)/RCT-Folly\"",
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
"\"$(PODS_ROOT)/DoubleConversion\"",
"\"$(PODS_ROOT)/fast_float/include\"",
"\"$(PODS_ROOT)/fmt/include\"",
]
if ENV['USE_FRAMEWORKS']
header_search_path = header_search_path + [
"\"$(PODS_TARGET_SRCROOT)\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"",
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/platform/ios\"",
# "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCodegen/ReactCodegen.framework/Headers\"",
]
end
Pod::Spec.new do |s|
s.name = "React-FabricImage"
s.version = version
s.summary = "Image Component for Fabric for React Native."
s.homepage = "https://reactnative.dev/"
s.license = package["license"]
s.author = "Meta Platforms, Inc. and its affiliates"
s.platforms = min_supported_versions
s.source = source
s.source_files = "react/renderer/components/image/**/*.{m,mm,cpp,h}"
s.exclude_files = "react/renderer/components/image/tests"
s.header_dir = "react/renderer/components/image"
s.compiler_flags = folly_compiler_flags
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"HEADER_SEARCH_PATHS" => header_search_path.join(" ")
}
if ENV['USE_FRAMEWORKS']
s.header_mappings_dir = './'
s.module_name = 'React_FabricImage'
end
s.dependency folly_dep_name, folly_version
s.dependency "React-jsiexecutor", version
s.dependency "RCTRequired", version
s.dependency "RCTTypeSafety", version
s.dependency "React-jsi"
s.dependency "React-logger"
s.dependency "glog"
s.dependency "DoubleConversion"
s.dependency "fast_float", "6.1.4"
s.dependency "fmt", "11.0.2"
s.dependency "React-featureflags"
s.dependency "React-utils"
s.dependency "Yoga"
add_dependency(s, "React-ImageManager", :additional_framework_paths => [
"react/renderer/components/view/platform/cxx",
"react/renderer/imagemanager/platform/ios",
])
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core")
add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"])
add_dependency(s, "React-Fabric", :additional_framework_paths => [
"react/renderer/components/view/platform/cxx",
"react/renderer/imagemanager/platform/ios"
])
add_dependency(s, "React-rendererdebug")
depend_on_js_engine(s)
end