Skip to content

Commit

Permalink
Merge pull request #140 from wroyca/develop
Browse files Browse the repository at this point in the history
 Tests for unistd.h, and includes it if present
  • Loading branch information
Rackover authored Sep 22, 2024
2 parents c005bd5 + 4e19edd commit 698e6dd
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions deps/premake/zlib.lua
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
zlib = {
source = path.join(dependencies.basePath, "zlib"),
}

function zlib.import()
links {"zlib"}
zlib.includes()
end

function zlib.includes()
includedirs {
zlib.source
}

defines {
"ZLIB_CONST",
}
end

function zlib.project()
project "zlib"
language "C"

zlib.includes()

files {
path.join(zlib.source, "*.h"),
path.join(zlib.source, "*.c"),
}

defines {
"_CRT_SECURE_NO_DEPRECATE",
}

warnings "Off"
kind "StaticLib"
end

table.insert(dependencies, zlib)
zlib = {
source = path.join(dependencies.basePath, "zlib"),
}

function zlib.import()
links {"zlib"}
zlib.includes()
end

function zlib.includes()
includedirs {
zlib.source
}

defines {
"ZLIB_CONST",
}

if os.isfile("/usr/include/unistd.h") then
defines { "HAVE_UNISTD_H" }
end
end

function zlib.project()
project "zlib"
language "C"

zlib.includes()

files {
path.join(zlib.source, "*.h"),
path.join(zlib.source, "*.c"),
}

defines {
"_CRT_SECURE_NO_DEPRECATE",
}

warnings "Off"
kind "StaticLib"
end

table.insert(dependencies, zlib)

0 comments on commit 698e6dd

Please sign in to comment.