16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/ryb/properties/targets.rb', line 16
def target(name, &block)
target = {:windows => Ryb::Targets::Windows,
:macosx => Ryb::Targets::MacOSX,
:linux => Ryb::Targets::Linux}[name].new(&block)
targets.merge!(name => target) do |_, *targets|
targets[0].instance_variable_set(:@version, targets[1].instance_variable_get(:@version))
targets[0].suffix ||= targets[1].suffix
targets[0].defines.merge!(targets[1].defines)
targets[0].flags.merge!(targets[1].flags)
targets[0]
end
end
|