This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/contrib/curl/premake5.lua

48 lines
1.0 KiB
Lua
Raw Normal View History

project "curl-lib"
language "C"
kind "StaticLib"
includedirs { "include", "lib", "../mbedtls/include/" }
defines { "BUILDING_LIBCURL", "CURL_STATICLIB", "HTTP_ONLY" }
warnings "off"
if not _OPTIONS["no-zlib"] then
defines { 'USE_ZLIB' }
includedirs { '../zlib' }
end
files
{
"**.h",
"**.c"
}
2017-04-13 17:07:20 +00:00
filter { "system:windows" }
defines { "USE_SCHANNEL", "USE_WINDOWS_SSPI" }
filter { "system:macosx" }
defines { "USE_DARWINSSL" }
filter { "system:not windows", "system:not macosx" }
defines { "USE_MBEDTLS" }
2017-04-13 17:07:20 +00:00
filter { "system:linux or bsd" }
defines { "CURL_HIDDEN_SYMBOLS" }
-- find the location of the ca bundle
local ca = nil
for _, f in ipairs {
"/etc/ssl/certs/ca-certificates.crt",
"/etc/pki/tls/certs/ca-bundle.crt",
"/usr/share/ssl/certs/ca-bundle.crt",
"/usr/local/share/certs/ca-root.crt",
2017-04-13 17:07:20 +00:00
"/usr/local/share/certs/ca-root-nss.crt",
"/etc/ssl/cert.pem" } do
if os.isfile(f) then
ca = f
break
end
end
if ca then
defines { 'CURL_CA_BUNDLE="' .. ca .. '"' }
end