Skip to content

Instantly share code, notes, and snippets.

@matricks
Created February 17, 2012 22:32
Show Gist options
  • Save matricks/1855830 to your computer and use it in GitHub Desktop.
Save matricks/1855830 to your computer and use it in GitHub Desktop.
Unit:Use("unit-base")
function Unit.Build(self, settings)
self.objects = {}
if config.zlib.value == 0 then
self.objects = Compile(settings, Collect("src/engine/external/zlib/*.c"))
end
end
function Unit.Use(self, settings)
if config.zlib.value == 1 then
settings.link.libs:Add("z")
if config.zlib.include_path then
settings.cc.includes:Add(config.zlib.include_path)
end
else
settings.link.extrafiles:Add(self.objects);
settings.cc.includes:Add("src/engine/external/zlib")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment