From 26f01faf1b3f801501f77d47b00e05fb8a8b3b32 Mon Sep 17 00:00:00 2001 From: Marc Horowitz Date: Thu, 6 Jul 2017 17:33:30 -0700 Subject: [PATCH] Make OSS CocoaPods build work with or without use_frameworks! Reviewed By: javache Differential Revision: D5361624 fbshipit-source-id: c2e5e8985827208a43e06932f746c6b9ccb146ad --- third-party-podspecs/Folly.podspec | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/third-party-podspecs/Folly.podspec b/third-party-podspecs/Folly.podspec index d68dcd056..1940c4ffa 100644 --- a/third-party-podspecs/Folly.podspec +++ b/third-party-podspecs/Folly.podspec @@ -12,16 +12,19 @@ Pod::Spec.new do |spec| spec.dependency 'DoubleConversion' spec.dependency 'GLog' spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1' - spec.header_mappings_dir = 'folly' spec.source_files = 'folly/Bits.cpp', 'folly/Conv.cpp', 'folly/Demangle.cpp', 'folly/StringBase.cpp', 'folly/Unicode.cpp', 'folly/dynamic.cpp', - 'folly/json.cpp' + 'folly/json.cpp', + 'folly/portability/BitsFunctexcept.cpp', + 'folly/detail/MallocImpl.cpp' # workaround for https://github.com/facebook/react-native/issues/14326 - spec.preserve_paths = 'folly/*.h' + spec.preserve_paths = 'folly/*.h', + 'folly/detail/*.h', + 'folly/portability/*.h' spec.libraries = "stdc++" spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", @@ -29,17 +32,4 @@ Pod::Spec.new do |spec| # Pinning to the same version as React.podspec. spec.platform = :ios, '8.0' - - spec.subspec "detail" do |ss| - ss.header_dir = 'folly/detail' - ss.source_files = 'folly/detail/*.h', - 'folly/detail/MallocImpl.cpp' - end - - spec.subspec "portability" do |ss| - ss.header_dir = 'folly/portability' - ss.source_files = 'folly/portability/*.h', - 'folly/portability/BitsFunctexcept.cpp' - end - end