Merge pull request #324 from mversluys/master
OSX and Linux SSL support and OSX fixes
This commit is contained in:
commit
bf619ff08f
@ -2,7 +2,7 @@
|
|||||||
/* lib/curl_config.h.in. Generated from configure.ac by autoheader. */
|
/* lib/curl_config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
/* Location of default ca bundle */
|
/* Location of default ca bundle */
|
||||||
#define CURL_CA_BUNDLE "/etc/pki/tls/certs/ca-bundle.crt"
|
/* #undef CURL_CA_BUNDLE */
|
||||||
|
|
||||||
/* Location of default ca path */
|
/* Location of default ca path */
|
||||||
/* #undef CURL_CA_PATH */
|
/* #undef CURL_CA_PATH */
|
||||||
|
@ -17,10 +17,31 @@ project "curl-lib"
|
|||||||
defines {"USE_SSL", "USE_SCHANNEL", "USE_WINDOWS_SSPI"}
|
defines {"USE_SSL", "USE_SCHANNEL", "USE_WINDOWS_SSPI"}
|
||||||
|
|
||||||
configuration { 'linux' }
|
configuration { 'linux' }
|
||||||
defines {"HAVE_CONFIG_H", "CURL_HIDDEN_SYMBOLS"}
|
|
||||||
|
defines {"HAVE_CONFIG_H", "CURL_HIDDEN_SYMBOLS" }
|
||||||
|
if os.findlib("ssl") then
|
||||||
|
defines { "USE_SSL", "USE_OPENSSL", "USE_SSLEAY" }
|
||||||
|
|
||||||
|
-- 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',
|
||||||
|
'/etc/ssl/cert.pem' } do
|
||||||
|
if os.isfile(f) then
|
||||||
|
ca = f
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if ca then
|
||||||
|
defines { 'CURL_CA_BUNDLE=\\"' .. ca .. '\\"' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
configuration { 'macosx' }
|
configuration { 'macosx' }
|
||||||
defines { 'HAVE_CONFIG_H' }
|
defines { 'HAVE_CONFIG_H', 'USE_SSL', 'USE_DARWINSSL' }
|
||||||
|
|
||||||
configuration "Release"
|
configuration "Release"
|
||||||
defines {"NDEBUG"}
|
defines {"NDEBUG"}
|
||||||
|
15
premake5.lua
15
premake5.lua
@ -90,6 +90,10 @@
|
|||||||
configurations { "Release", "Debug" }
|
configurations { "Release", "Debug" }
|
||||||
location ( _OPTIONS["to"] )
|
location ( _OPTIONS["to"] )
|
||||||
|
|
||||||
|
configuration { "macosx", "gmake" }
|
||||||
|
buildoptions { "-mmacosx-version-min=10.4" }
|
||||||
|
linkoptions { "-mmacosx-version-min=10.4" }
|
||||||
|
|
||||||
project "Premake5"
|
project "Premake5"
|
||||||
targetname "premake5"
|
targetname "premake5"
|
||||||
language "C"
|
language "C"
|
||||||
@ -155,14 +159,20 @@
|
|||||||
configuration "linux or hurd"
|
configuration "linux or hurd"
|
||||||
links { "dl", "rt" }
|
links { "dl", "rt" }
|
||||||
|
|
||||||
|
configuration "linux"
|
||||||
|
if not _OPTIONS["no-curl"] and os.findlib("ssl") then
|
||||||
|
links { "ssl", "crypto" }
|
||||||
|
end
|
||||||
|
|
||||||
configuration "macosx"
|
configuration "macosx"
|
||||||
defines { "LUA_USE_MACOSX" }
|
defines { "LUA_USE_MACOSX" }
|
||||||
links { "CoreServices.framework" }
|
links { "CoreServices.framework" }
|
||||||
|
if not _OPTIONS["no-curl"] then
|
||||||
|
links { "Security.framework" }
|
||||||
|
end
|
||||||
|
|
||||||
configuration { "macosx", "gmake" }
|
configuration { "macosx", "gmake" }
|
||||||
toolset "clang"
|
toolset "clang"
|
||||||
buildoptions { "-mmacosx-version-min=10.4" }
|
|
||||||
linkoptions { "-mmacosx-version-min=10.4" }
|
|
||||||
|
|
||||||
configuration { "solaris" }
|
configuration { "solaris" }
|
||||||
linkoptions { "-Wl,--export-dynamic" }
|
linkoptions { "-Wl,--export-dynamic" }
|
||||||
@ -171,6 +181,7 @@
|
|||||||
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
|
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
|
||||||
links { "m" }
|
links { "m" }
|
||||||
|
|
||||||
|
|
||||||
-- optional 3rd party libraries
|
-- optional 3rd party libraries
|
||||||
group "contrib"
|
group "contrib"
|
||||||
if not _OPTIONS["no-zlib"] then
|
if not _OPTIONS["no-zlib"] then
|
||||||
|
@ -304,9 +304,11 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if #result > 1 then
|
if cfg.system ~= premake.MACOSX then
|
||||||
table.insert(result, 1, "-Wl,--start-group")
|
if #result > 1 then
|
||||||
table.insert(result, "-Wl,--end-group")
|
table.insert(result, 1, "-Wl,--start-group")
|
||||||
|
table.insert(result, "-Wl,--end-group")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- The "-l" flag is fine for system libraries
|
-- The "-l" flag is fine for system libraries
|
||||||
|
Loading…
Reference in New Issue
Block a user