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 8# Whether Hermes is built for Release or Debug is determined by the PRODUCTION envvar. 9build_type = ENV['PRODUCTION'] == "1" ? :release : :debug 10 11# package.json 12package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) 13version = package['version'] 14 15 16 17folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32' 18folly_version = '2021.07.22.00' 19boost_compiler_flags = '-Wno-documentation' 20 21Pod::Spec.new do |s| 22 s.name = "ABI48_0_0React-hermes" 23 s.version = version 24 s.summary = "Hermes engine for React Native" 25 s.homepage = "https://reactnative.dev/" 26 s.license = package['license'] 27 s.author = "Facebook, Inc. and its affiliates" 28 s.platforms = { :osx => "10.14", :ios => "12.4" } 29 s.source = { :path => "." } 30 s.source_files = "executor/*.{cpp,h}", 31 "inspector/*.{cpp,h}", 32 "inspector/chrome/*.{cpp,h}", 33 "inspector/detail/*.{cpp,h}" 34 s.public_header_files = "executor/HermesExecutorFactory.h" 35 s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags 36 s.pod_target_xcconfig = { 37 "HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"" 38 }.merge!(build_type == :debug ? { "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1" } : {}) 39 s.header_dir = "ABI48_0_0reacthermes" 40 s.dependency "ABI48_0_0React-cxxreact", version 41 s.dependency "ABI48_0_0React-jsiexecutor", version 42 s.dependency "ABI48_0_0React-jsinspector", version 43 s.dependency "ABI48_0_0React-perflogger", version 44 s.dependency "RCT-Folly", folly_version 45 s.dependency "DoubleConversion" 46 s.dependency "glog" 47 s.dependency "RCT-Folly/Futures", folly_version 48 s.dependency "ABI48_0_0hermes-engine" 49 s.dependency "ABI48_0_0React-jsi" 50end 51