Skip to content

Commit

Permalink
Use relative path instead of absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Oct 20, 2022
1 parent 7eaa3b7 commit 9e01ccd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ SPEC CHECKSUMS:
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNCPicker: 914b557e20b3b8317b084aca9ff4b4edb95f61e4
RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122
RNReanimated: 1ab54730271b705fccd428b1b4b2eeef548c8c38
RNReanimated: 6c980139eb3b043569a08b8cb3d92cdf46bd54fa
RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d
RNSVG: 07dbd870b0dcdecc99b3a202fa37c8ca163caec2
Yoga: 2ed968a4f060a92834227c036279f2736de0fce3
Expand Down
2 changes: 1 addition & 1 deletion FabricExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: e9b1f9310158a1e265bcdfdfd8c62d6174b947a2
ReactCommon: 01064177e66d652192c661de899b1076da962fd9
RNGestureHandler: 8e5218fe0fde045c6f318202fc51ce3638deee54
RNReanimated: 006f0b2aac354f7d2e2fb046c357819e9be6d7a0
RNReanimated: ec9d4786dfc7f7d064f5114aa8e9737d7740704e
RNScreens: 208223c783496e6d0aa92ffdf307f61d58756fc1
RNSVG: 8ef4c60d9378eab6996a3f006dfb5784e6dab302
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
Expand Down
9 changes: 5 additions & 4 deletions RNReanimated.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ Pod::Spec.new do |s|
"Common/cpp/hidden_headers/**"
]

s.pod_target_xcconfig = {
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
}
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags + ' -DHERMES_ENABLE_DEBUGGER'
s.xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\" \"#{config[:react_native_common_dir]}\"",
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags + " " + fabric_flags }
s.xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/Headers/Public/React-hermes\" \"$(PODS_ROOT)/Headers/Public/hermes-engine\" \"$(PODS_ROOT)/#{config[:react_native_common_dir]}\"",
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags + " " + fabric_flags
}

s.requires_arc = true

Expand Down
6 changes: 5 additions & 1 deletion scripts/reanimated_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ def find_config()
result[:react_native_minor_version] = react_native_json['version'].split('.')[1].to_i
result[:react_native_node_modules_dir] = File.expand_path(react_native_node_modules_dir)
result[:reanimated_node_modules_dir] = File.expand_path(File.join(__dir__, '..', '..'))
result[:react_native_common_dir] = File.join(react_native_node_modules_dir, 'react-native', 'ReactCommon')

pods_root = Pod::Config.instance.project_pods_root
react_native_common_dir_absolute = File.join(react_native_node_modules_dir, 'react-native', 'ReactCommon')
react_native_common_dir_relative = Pathname.new(react_native_common_dir_absolute).relative_path_from(pods_root).to_s
result[:react_native_common_dir] = react_native_common_dir_relative

return result
end
Expand Down

0 comments on commit 9e01ccd

Please sign in to comment.