mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 10:28:34 +00:00
Add support for compiling MySQL ext against MySQL Connector/C instead of
full client lib. This makes for a lighter dependency, both in size and not being tied to MySQL client version. Tested against previous GA version, 6.0.2. Latest, 6.1.11 requires dynamic linking with CRT on Windows, making specific MSVC redist required on client. Only tested with Windows so far. Still need to test compile/run on Linux and Mac. Dependency checkout scripts and MYSQL env vars in our own build environment need to be checked as well.
This commit is contained in:
parent
0a91b1f5b1
commit
f3319ccc82
@ -23,9 +23,9 @@ if SM.mysql_root:
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.defines += ['WIN32_LEAN_AND_MEAN']
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root[arch], 'lib', 'opt', 'mysqlclient.lib'),
|
||||
os.path.join(SM.mysql_root[arch], 'lib', 'opt', 'zlib.lib'),
|
||||
os.path.join(SM.mysql_root[arch], 'lib', 'mysqlclient.lib'),
|
||||
'wsock32.lib'
|
||||
]
|
||||
|
||||
|
||||
@ -36,14 +36,12 @@
|
||||
#include <IDBDriver.h>
|
||||
#include <sm_platform.h>
|
||||
#if defined PLATFORM_WINDOWS
|
||||
#include <winsock.h>
|
||||
#include <WinSock2.h>
|
||||
#endif
|
||||
|
||||
#include <mysql.h>
|
||||
#if !defined(PLATFORM_WINDOWS)
|
||||
# include <my_global.h>
|
||||
# include <my_sys.h>
|
||||
#endif
|
||||
#include <my_global.h>
|
||||
#include <my_sys.h>
|
||||
|
||||
#include <sh_string.h>
|
||||
#include <sh_list.h>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user