Skip to content

Commit

Permalink
fix: Add support for JSI_PATH env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Sep 23, 2022
1 parent 46bc854 commit 5e74fe4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions sdks/hermes-engine/hermes-engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ Pod::Spec.new do |spec|
export RELEASE_VERSION="#{version}"
export IOS_DEPLOYMENT_TARGET="#{spec.deployment_target('ios')}"
export MAC_DEPLOYMENT_TARGET="#{spec.deployment_target('osx')}"
export BUILD_TYPE=#{HermesHelper::BUILD_TYPE == :debug ? "Debug" : "Release"}
export JSI_PATH="#{react_native_path}/ReactCommon/jsi"
echo ">>> hermes-engine.podspec ${JSI_PATH}"
export BUILD_TYPE=#{HermesHelper::BUILD_TYPE.to_s.capitalize}
# Set HERMES_OVERRIDE_HERMESC_PATH if pre-built HermesC is available
#{File.exist?(import_hermesc_file) ? "export HERMES_OVERRIDE_HERMESC_PATH=#{import_hermesc_file}" : ""}
Expand Down
6 changes: 4 additions & 2 deletions sdks/hermes-engine/utils/build-apple-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
NUM_CORES=$(sysctl -n hw.ncpu)
IMPORT_HERMESC_PATH=${HERMES_OVERRIDE_HERMESC_PATH:-$PWD/build_host_hermesc/ImportHermesc.cmake}
REACT_NATIVE_PATH=${REACT_NATIVE_PATH:-$PWD/../..}
JSI_PATH="$REACT_NATIVE_PATH/ReactCommon/jsi"
if [[ -z JSI_PATH ]]; then
JSI_PATH="$REACT_NATIVE_PATH/ReactCommon/jsi"
fi

function use_env_var_or_ruby_prop {
if [[ -n "$1" ]]; then
Expand Down Expand Up @@ -55,7 +57,7 @@ function configure_apple_framework {
else
enable_debugger="false"
fi

echo ">>> $JSI_PATH"
cmake -S . -B "build_$1" \
-DHERMES_APPLE_TARGET_PLATFORM:STRING="$1" \
-DCMAKE_OSX_ARCHITECTURES:STRING="$2" \
Expand Down

0 comments on commit 5e74fe4

Please sign in to comment.