From 113bff455c6c80354488a7f22cd0e4c08a6ef7f0 Mon Sep 17 00:00:00 2001 From: ivoryxiong Date: Wed, 3 May 2017 15:59:26 +0800 Subject: [PATCH] set cocoapod spec's compiler_flags to xcodebuild arg OTHER_CFLAGS --- lib/cocoapods-packager/builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cocoapods-packager/builder.rb b/lib/cocoapods-packager/builder.rb index ba3b910..723550e 100755 --- a/lib/cocoapods-packager/builder.rb +++ b/lib/cocoapods-packager/builder.rb @@ -147,7 +147,7 @@ def build_static_lib_for_mac(static_libs, output) def build_with_mangling(platform, options) UI.puts 'Mangling symbols' defines = Symbols.mangle_for_pod_dependencies(@spec.name, @static_sandbox_root) - defines << ' ' << @spec.consumer(platform).compiler_flags.join(' ') + defines << " OTHER_CFLAGS='" << @spec.consumer(platform).compiler_flags.join(' ') << "'" UI.puts 'Building mangled framework' xcodebuild(defines, options) @@ -165,7 +165,7 @@ def clean_directory_for_dynamic_build def compile(platform) defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name}'" - defines << ' ' << @spec.consumer(platform).compiler_flags.join(' ') + defines << " OTHER_CFLAGS='" << @spec.consumer(platform).compiler_flags.join(' ') << "'" if platform.name == :ios options = ios_build_options