Added option "default" for link_static. By default Windows builds are

linked statically, while Posix builds use MariaDB Connector/C shared library.
This commit is contained in:
Georg Richter
2020-04-15 06:11:12 +02:00
parent 742b643f38
commit 0a05581075
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ def get_config(options):
cfg.includes = [".\\include", mariadb_dir + "\\include", mariadb_dir + "\\include\\mysql"]
cfg.lib_dirs = [mariadb_dir + "\\lib"]
cfg.libs = ["ws2_32", "advapi32", "kernel32", "shlwapi", "crypt32"]
if static.lower() == "on":
if static.lower() == "on" or static_lower == "default":
cfg.libs.append("mariadbclient")
else:
cfg.libs.append("libmariadb")

View File

@ -1,7 +1,7 @@
# configuration file for building MariaDB Connector/C Python
[cc_options]
# static or dynamic linking
link_static=on
link_static=default
# Windows: location of MySQL Connector/C installation
install_dir=c:\Program Files\MariaDB\MariaDB Connector C 64-bit
# Posix: location of mariadb_config executable