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
|
|
|
if SM.mysql_root:
|
|
|
|
binary = SM.ExtLibrary(builder, 'dbi.mysql.ext')
|
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(SM.mysql_root, 'include'),
|
|
|
|
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
if builder.target_platform is 'linux' or builder.target_platform is 'darwin':
|
|
|
|
binary.compiler.postlink += [
|
|
|
|
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
|
|
|
|
'-lz',
|
|
|
|
'-lpthread',
|
|
|
|
'-lm'
|
|
|
|
]
|
|
|
|
elif builder.target_platform is 'windows':
|
|
|
|
binary.compiler.postlink += [
|
|
|
|
os.path.join(SM.mysql_root, 'lib', 'opt', 'mysqlclient.lib'),
|
|
|
|
os.path.join(SM.mysql_root, 'lib', 'opt', 'zlib.lib'),
|
|
|
|
'wsock32.lib'
|
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.sources += [
|
|
|
|
'sdk/smsdk_ext.cpp',
|
|
|
|
'mysql/MyBasicResults.cpp',
|
|
|
|
'mysql/MyBoundResults.cpp',
|
|
|
|
'mysql/MyDatabase.cpp',
|
|
|
|
'mysql/MyDriver.cpp',
|
|
|
|
'mysql/MyStatement.cpp',
|
|
|
|
'extension.cpp'
|
|
|
|
]
|
|
|
|
SM.binaries += [builder.Add(binary)]
|
2012-04-14 02:12:24 +02:00
|
|
|
|