1# Copyright (c) Meta Platforms, Inc. and affiliates. 2# 3# This source code is licensed under the MIT license found in the 4# LICENSE file in the root directory of this source tree. 5 6require "json" 7 8package = JSON.parse(File.read(File.join(__dir__, "..", "package.json"))) 9version = package['version'] 10 11 12 13folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' 14folly_version = '2021.07.22.00' 15boost_compiler_flags = '-Wno-documentation' 16 17Pod::Spec.new do |s| 18 s.name = "ABI47_0_0ReactCommon" 19 s.module_name = "ABI47_0_0ReactCommon" 20 s.version = version 21 s.summary = "-" # TODO 22 s.homepage = "https://reactnative.dev/" 23 s.license = package["license"] 24 s.author = "Facebook, Inc. and its affiliates" 25 s.platforms = { :ios => "12.4" } 26 s.source = { :path => "." } 27 s.header_dir = "ABI47_0_0ReactCommon" # Use global header_dir for all subspecs for use_frameworks! compatibility 28 s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags 29 s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/ABI47_0_0React-Core\" \"$(PODS_ROOT)/Headers/Private/ABI47_0_0React-bridging/react/bridging\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ABI47_0_0React-bridging/react_bridging.framework/Headers\"", 30 "USE_HEADERMAP" => "YES", "DEFINES_MODULE" => "YES", 31 "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" } 32 33 # TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..." 34 # Note: Update this only when ready to minimize breaking changes. 35 s.subspec "turbomodule" do |ss| 36 ss.dependency "ABI47_0_0React-bridging", version 37 ss.dependency "ABI47_0_0React-callinvoker", version 38 ss.dependency "ABI47_0_0React-perflogger", version 39 ss.dependency "ABI47_0_0React-Core", version 40 ss.dependency "ABI47_0_0React-cxxreact", version 41 ss.dependency "ABI47_0_0React-jsi", version 42 ss.dependency "RCT-Folly", folly_version 43 s.dependency "ABI47_0_0React-logger", version 44 ss.dependency "DoubleConversion" 45 ss.dependency "glog" 46 47 ss.subspec "core" do |sss| 48 sss.source_files = "react/nativemodule/core/ReactCommon/**/*.{cpp,h}", 49 "react/nativemodule/core/platform/ios/**/*.{mm,cpp,h}" 50 end 51 52 s.subspec "react_debug_core" do |sss| 53 sss.source_files = "react/debug/*.{cpp,h}" 54 end 55 56 ss.subspec "samples" do |sss| 57 sss.source_files = "react/nativemodule/samples/ReactCommon/**/*.{cpp,h}", 58 "react/nativemodule/samples/platform/ios/**/*.{mm,cpp,h}" 59 sss.dependency "ABI47_0_0ReactCommon/turbomodule/core", version 60 end 61 end 62end 63