Switch to AMBuild 2.1 API. (#694)
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python :
|
||||
import os
|
||||
|
||||
libcurl = builder.RunScript('curl-src/lib/AMBuilder')
|
||||
libcurl = builder.Build('curl-src/lib/AMBuilder')
|
||||
|
||||
binary = SM.ExtLibrary(builder, 'webternet.ext')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
binary.compiler.defines += ['CURL_STATICLIB']
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
binary.compiler.postlink += [libcurl.binary]
|
||||
if builder.target_platform == 'linux':
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target_platform == 'windows':
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.postlink += ['ws2_32.lib']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -3,24 +3,24 @@ import os, platform
|
||||
|
||||
builder.SetBuildFolder('libcurl')
|
||||
|
||||
binary = builder.compiler.StaticLibrary('curl')
|
||||
binary = SM.StaticLibrary(builder, 'curl')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'lib'),
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
|
||||
if builder.target_platform == 'mac':
|
||||
if builder.target.platform == 'mac':
|
||||
mac_version, ignore, ignore = platform.mac_ver()
|
||||
mac_tuple = mac_version.split('.')
|
||||
if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
|
||||
binary.compiler.defines += ['BUILTIN_STRLCAT']
|
||||
elif builder.target_platform == 'windows':
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.defines += [
|
||||
'BUILDING_LIBCURL',
|
||||
'CURL_STATICLIB',
|
||||
'CURL_DISABLE_LDAP',
|
||||
]
|
||||
elif builder.target_platform == 'linux':
|
||||
elif builder.target.platform == 'linux':
|
||||
binary.compiler.defines += ['_GNU_SOURCE']
|
||||
|
||||
if binary.compiler.vendor == 'clang':
|
||||
|
||||
Reference in New Issue
Block a user