64-bit support for CSGO on Linux and macOS (#705)
This commit is contained in:
+38
-37
@@ -2,45 +2,46 @@
|
||||
import os
|
||||
|
||||
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')
|
||||
]
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
if builder.target.platform == 'linux' or builder.target.platform == 'mac':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
|
||||
'-lz',
|
||||
'-lpthread',
|
||||
'-lm',
|
||||
]
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target.platform == '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'
|
||||
for arch in SM.archs:
|
||||
binary = SM.ExtLibrary(builder, 'dbi.mysql.ext', arch)
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mysql_root[arch], 'include'),
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
||||
]
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
binary.sources += [
|
||||
'../../public/smsdk_ext.cpp',
|
||||
'mysql/MyBasicResults.cpp',
|
||||
'mysql/MyBoundResults.cpp',
|
||||
'mysql/MyDatabase.cpp',
|
||||
'mysql/MyDriver.cpp',
|
||||
'mysql/MyStatement.cpp',
|
||||
'extension.cpp'
|
||||
]
|
||||
if builder.target.platform == 'linux' or builder.target.platform == 'mac':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root[arch], 'lib', 'libmysqlclient_r.a'),
|
||||
'-lz',
|
||||
'-lpthread',
|
||||
'-lm',
|
||||
]
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target.platform == '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'
|
||||
]
|
||||
|
||||
binary.sources += [
|
||||
'../../public/smsdk_ext.cpp',
|
||||
'mysql/MyBasicResults.cpp',
|
||||
'mysql/MyBoundResults.cpp',
|
||||
'mysql/MyDatabase.cpp',
|
||||
'mysql/MyDriver.cpp',
|
||||
'mysql/MyStatement.cpp',
|
||||
'extension.cpp'
|
||||
]
|
||||
|
||||
if binary.compiler.family == 'msvc' and binary.compiler.version >= 1900:
|
||||
binary.sources += [ 'msvc15hack.c' ]
|
||||
binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib']
|
||||
if binary.compiler.family == 'msvc' and binary.compiler.version >= 1900:
|
||||
binary.sources += [ 'msvc15hack.c' ]
|
||||
binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib']
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user