From 9e01ccd8646090e483e7e16b23b262dae46b80e7 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Thu, 20 Oct 2022 15:59:13 +0200 Subject: [PATCH] Use relative path instead of absolute --- Example/ios/Podfile.lock | 2 +- FabricExample/ios/Podfile.lock | 2 +- RNReanimated.podspec | 9 +++++---- scripts/reanimated_utils.rb | 6 +++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Example/ios/Podfile.lock b/Example/ios/Podfile.lock index 54b6361d2a8..3b41e6985bf 100644 --- a/Example/ios/Podfile.lock +++ b/Example/ios/Podfile.lock @@ -550,7 +550,7 @@ SPEC CHECKSUMS: RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f RNCPicker: 914b557e20b3b8317b084aca9ff4b4edb95f61e4 RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122 - RNReanimated: 1ab54730271b705fccd428b1b4b2eeef548c8c38 + RNReanimated: 6c980139eb3b043569a08b8cb3d92cdf46bd54fa RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d RNSVG: 07dbd870b0dcdecc99b3a202fa37c8ca163caec2 Yoga: 2ed968a4f060a92834227c036279f2736de0fce3 diff --git a/FabricExample/ios/Podfile.lock b/FabricExample/ios/Podfile.lock index a817904e9f8..52f6c72c3bc 100644 --- a/FabricExample/ios/Podfile.lock +++ b/FabricExample/ios/Podfile.lock @@ -1018,7 +1018,7 @@ SPEC CHECKSUMS: React-runtimeexecutor: e9b1f9310158a1e265bcdfdfd8c62d6174b947a2 ReactCommon: 01064177e66d652192c661de899b1076da962fd9 RNGestureHandler: 8e5218fe0fde045c6f318202fc51ce3638deee54 - RNReanimated: 006f0b2aac354f7d2e2fb046c357819e9be6d7a0 + RNReanimated: ec9d4786dfc7f7d064f5114aa8e9737d7740704e RNScreens: 208223c783496e6d0aa92ffdf307f61d58756fc1 RNSVG: 8ef4c60d9378eab6996a3f006dfb5784e6dab302 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 diff --git a/RNReanimated.podspec b/RNReanimated.podspec index 499d1475fdc..b38ebda90af 100644 --- a/RNReanimated.podspec +++ b/RNReanimated.podspec @@ -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 diff --git a/scripts/reanimated_utils.rb b/scripts/reanimated_utils.rb index d369e5a7679..084b945f893 100644 --- a/scripts/reanimated_utils.rb +++ b/scripts/reanimated_utils.rb @@ -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