1*753557f6STomasz Sapeta# Copyright (c) Meta Platforms, Inc. and affiliates.
2*753557f6STomasz Sapeta#
3*753557f6STomasz Sapeta# This source code is licensed under the MIT license found in the
4*753557f6STomasz Sapeta# LICENSE file in the root directory of this source tree.
5*753557f6STomasz Sapeta
6*753557f6STomasz Sapetarequire "json"
7*753557f6STomasz Sapeta
8*753557f6STomasz Sapetapackage = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
9*753557f6STomasz Sapetaversion = package['version']
10*753557f6STomasz Sapeta
11*753557f6STomasz Sapeta
12*753557f6STomasz Sapeta
13*753557f6STomasz Sapetafolly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
14*753557f6STomasz Sapetafolly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
15*753557f6STomasz Sapetafolly_version = '2021.07.22.00'
16*753557f6STomasz Sapetaboost_compiler_flags = '-Wno-documentation'
17*753557f6STomasz Sapeta
18*753557f6STomasz SapetaPod::Spec.new do |s|
19*753557f6STomasz Sapeta  s.name                   = "ABI47_0_0React-RCTFabric"
20*753557f6STomasz Sapeta  s.version                = version
21*753557f6STomasz Sapeta  s.summary                = "RCTFabric for React Native."
22*753557f6STomasz Sapeta  s.homepage               = "https://reactnative.dev/"
23*753557f6STomasz Sapeta  s.license                = package["license"]
24*753557f6STomasz Sapeta  s.author                 = "Facebook, Inc. and its affiliates"
25*753557f6STomasz Sapeta  s.platforms              = { :ios => "12.4" }
26*753557f6STomasz Sapeta  s.source                 = { :path => "." }
27*753557f6STomasz Sapeta  s.source_files           = "Fabric/**/*.{c,h,m,mm,S,cpp}"
28*753557f6STomasz Sapeta  s.exclude_files          = "**/tests/*",
29*753557f6STomasz Sapeta                             "**/android/*",
30*753557f6STomasz Sapeta  s.compiler_flags         = folly_compiler_flags + ' ' + boost_compiler_flags
31*753557f6STomasz Sapeta  s.header_dir             = "ABI47_0_0React"
32*753557f6STomasz Sapeta  s.module_name            = "ABI47_0_0RCTFabric"
33*753557f6STomasz Sapeta  s.framework              = "JavaScriptCore"
34*753557f6STomasz Sapeta  s.pod_target_xcconfig    = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" }
35*753557f6STomasz Sapeta  s.xcconfig               = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
36*753557f6STomasz Sapeta                               "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags  }
37*753557f6STomasz Sapeta
38*753557f6STomasz Sapeta  s.dependency "ABI47_0_0React-Core", version
39*753557f6STomasz Sapeta  s.dependency "ABI47_0_0React-Fabric", version
40*753557f6STomasz Sapeta  s.dependency "ABI47_0_0React-RCTImage", version
41*753557f6STomasz Sapeta  s.dependency "RCT-Folly/Fabric", folly_version
42*753557f6STomasz Sapeta
43*753557f6STomasz Sapeta  s.test_spec 'Tests' do |test_spec|
44*753557f6STomasz Sapeta    test_spec.source_files = "Tests/**/*.{mm}"
45*753557f6STomasz Sapeta    test_spec.framework = "XCTest"
46*753557f6STomasz Sapeta  end
47*753557f6STomasz Sapetaend
48