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 -DFOLLY_HAVE_CLOCK_GETTIME=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_0React-hermes"
19  s.version                = version
20  s.summary                = "-"  # TODO
21  s.homepage               = "https://reactnative.dev/"
22  s.license                = package["license"]
23  s.author                 = "Facebook, Inc. and its affiliates"
24  s.platforms              = { :osx => "10.14", :ios => "12.4" }
25  s.source                 = { :path => "." }
26  s.source_files           = "executor/*.{cpp,h}",
27                             "inspector/*.{cpp,h}",
28                             "inspector/chrome/*.{cpp,h}",
29                             "inspector/detail/*.{cpp,h}"
30  s.public_header_files    = "executor/HermesExecutorFactory.h"
31  s.compiler_flags         = folly_compiler_flags + ' ' + boost_compiler_flags
32  s.pod_target_xcconfig    = {
33                               "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"",
34                               "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1",
35                             }
36  s.header_dir             = "ABI47_0_0reacthermes"
37  s.dependency "ABI47_0_0React-cxxreact", version
38  s.dependency "ABI47_0_0React-jsi", version
39  s.dependency "ABI47_0_0React-jsiexecutor", version
40  s.dependency "ABI47_0_0React-jsinspector", version
41  s.dependency "ABI47_0_0React-perflogger", version
42  s.dependency "RCT-Folly", folly_version
43  s.dependency "DoubleConversion"
44  s.dependency "glog"
45  s.dependency "RCT-Folly/Futures", folly_version
46  s.dependency "ABI47_0_0hermes-engine"
47end
48