1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import os
Extension.configure()
projectName = 'curl'
ext = builder.compiler.Library(projectName + '.ext')
Extension.ConfigureForExtension(builder, ext.compiler)
ext.sources += [os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')]
ext.sources += [os.path.join('extension', p) for p in [
'curlmanager.cpp',
'curlthread.cpp',
'extension.cpp',
'natives.cpp',
'opensslmanager.cpp',
'opensslthread.cpp'
]]
# pkg_config fix never got backported to 2.0
import types
from ambuild2.frontend.v2_2.cpp.compiler import CliCompiler
def run_pkg_config(self, argv):
return CliCompiler.run_pkg_config(argv)
ext.compiler.run_pkg_config = types.MethodType(run_pkg_config, ext.compiler)
ext.compiler.cxxincludes += [
os.path.join(builder.currentSourcePath, 'extension'),
os.path.join(Extension.mms_root, 'core', 'sourcehook')
]
ext.compiler.cxxflags += ['-Wno-error=deprecated-declarations']
ext.compiler.pkg_config('libcurl')
ext.compiler.pkg_config('openssl')
Extension.extensions += [builder.Add(ext)]
|