lib/cocoapods-jxedt/binary/targets/pod_target.rb in cocoapods-jxedt-0.0.20 vs lib/cocoapods-jxedt/binary/targets/pod_target.rb in cocoapods-jxedt-0.0.21

- old
+ new

@@ -52,12 +52,10 @@ class Target # @since 1.5.0 class BuildSettings # missing framework header search paths def missing_framework_header_search_path(pt) - return [] unless pt.frame_header_search_paths_enable? - paths = [] pt.file_accessors.each do |file_accessor| # xcframeworks greater_than_or_equal_to_1_10_0 = Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0') greater_than_or_equal_to_1_11_0 = Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.11.0') @@ -121,21 +119,26 @@ class AggregateTargetSettings # @return [Array<String>] alias_method :old_raw_header_search_paths, :_raw_header_search_paths def _raw_header_search_paths header_search_paths = old_raw_header_search_paths - header_search_paths.concat pod_targets.flat_map { |pt| missing_framework_header_search_path(pt) } + header_search_paths.concat pod_targets.flat_map { |pt| + search_paths = [] + search_paths.concat missing_framework_header_search_path(pt) if pt.frame_header_search_paths_enable? + search_paths + } header_search_paths.uniq end end # A subclass that generates build settings for a {PodTarget} class PodTargetSettings # @return [Array<String>] alias_method :old_raw_header_search_paths, :_raw_header_search_paths def _raw_header_search_paths header_search_paths = old_raw_header_search_paths - header_search_paths.concat dependent_targets.flat_map { |pt| missing_framework_header_search_path(pt) } if target.should_build? + # 两个条件都满足时添加header_search_paths + header_search_paths.concat dependent_targets.flat_map { |pt| missing_framework_header_search_path(pt) } if target.should_build? && target.frame_header_search_paths_enable? header_search_paths.uniq end # 按照规则替换framework_search_paths,兼容不同的configuration # 从编译上来说,仅仅替换了framework_search_paths的路径就够了 \ No newline at end of file