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)]