2013-12-30 23:50:56 +01:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
2009-08-30 09:46:56 +02:00
|
|
|
import os
|
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary = SM.ExtLibrary(builder, 'regex.ext')
|
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2014-02-10 05:50:20 +01:00
|
|
|
if builder.target_platform == 'linux':
|
2013-12-30 23:50:56 +01:00
|
|
|
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux', 'libpcre.a')
|
2014-02-10 05:50:20 +01:00
|
|
|
elif builder.target_platform == 'windows':
|
2013-12-30 23:50:56 +01:00
|
|
|
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_win', 'pcre.lib')
|
2014-02-10 05:50:20 +01:00
|
|
|
elif builder.target_platform == 'mac':
|
2013-12-30 23:50:56 +01:00
|
|
|
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a')
|
|
|
|
binary.compiler.postlink += [binary.Dep(path)]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.sources += [
|
|
|
|
'extension.cpp',
|
|
|
|
'CRegEx.cpp',
|
2014-04-24 04:19:28 +02:00
|
|
|
'../../public/smsdk_ext.cpp'
|
2013-12-30 23:50:56 +01:00
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:59 +01:00
|
|
|
SM.extensions += [builder.Add(binary)]
|
2012-04-14 02:12:24 +02:00
|
|
|
|