11# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
22import os
33
4- if SM .mysql_root :
4+ if SM .mariadb_root :
55 for cxx in builder .targets :
66 arch = cxx .target .arch
77 binary = SM .ExtLibrary (builder , cxx , 'dbi.mysql.ext' )
88 binary .compiler .cxxincludes += [
9- os .path .join (SM .mysql_root [arch ], 'include' ),
9+ os .path .join (SM .mariadb_root [arch ], 'include' , 'mariadb ' ),
1010 os .path .join (SM .mms_root , 'core' , 'sourcehook' )
1111 ]
1212 if binary .compiler .family == 'gcc' or binary .compiler .family == 'clang' :
1313 binary .compiler .cxxflags += ['-fno-rtti' ]
1414 elif binary .compiler .family == 'msvc' :
1515 binary .compiler .cxxflags += ['/GR-' ]
16- if builder .options .debug == '1' :
17- binary .compiler .cflags += ['/MDd' ]
18- else :
19- binary .compiler .cflags += ['/MD' ]
2016
2117 if binary .compiler .target .platform == 'linux' or binary .compiler .target .platform == 'mac' :
2218 binary .compiler .postlink += [
23- os .path .join (SM .mysql_root [arch ], 'lib' , 'libmysqlclient .a' ),
19+ os .path .join (SM .mariadb_root [arch ], 'lib' , 'libmariadbclient .a' ),
2420 '-lz' ,
2521 '-lpthread' ,
2622 '-lm' ,
2723 ]
2824 if binary .compiler .target .platform == 'linux' :
29- binary .compiler .postlink += ['-lrt' ]
25+ binary .compiler .postlink += ['-lrt' , '-ldl' , '-lssl' , '-lcrypto' ]
3026 elif binary .compiler .target .platform == 'windows' :
3127 binary .compiler .defines += ['WIN32_LEAN_AND_MEAN' ]
3228 if builder .options .debug == '1' :
3329 binary .compiler .defines += ['_ITERATOR_DEBUG_LEVEL=2' ]
3430 binary .compiler .postlink += [
35- os .path .join (SM .mysql_root [arch ], 'lib' , 'debug' , 'mysqlclient .lib' ),
31+ os .path .join (SM .mariadb_root [arch ], 'lib' , 'debug' , 'mariadbclient .lib' ),
3632 ]
3733 else :
3834 binary .compiler .postlink += [
39- os .path .join (SM .mysql_root [arch ], 'lib' , 'mysqlclient .lib' ),
35+ os .path .join (SM .mariadb_root [arch ], 'lib' , 'mariadbclient .lib' ),
4036 ]
4137 binary .compiler .postlink += [
4238 'crypt32.lib' ,
43- 'wsock32.lib'
39+ 'secur32.lib' ,
40+ 'bcrypt.lib' ,
41+ 'ws2_32.lib' ,
42+ 'shlwapi.lib' ,
4443 ]
4544
4645 binary .sources += [
@@ -59,4 +58,3 @@ if SM.mysql_root:
5958 binary .compiler .defines += ['HAVE_STRUCT_TIMESPEC' ]
6059
6160 SM .extensions += [builder .Add (binary )]
62-
0 commit comments