sgrif / mysqlclient-sys

Rust bindings for libmysqlclient
Apache License 2.0
37 stars 31 forks source link

Adding MYSQLCLIENT_STATIC env check. #29

Closed BlackDex closed 3 years ago

BlackDex commented 3 years ago

Most *-sys crate's allow to force a STATIC build. This patch adds this function to mysqlcient-sys to force a static link. If the variable is not there it will continue as defaulted before.

This together with a custom static build mysqlclient library you can build a static application using diesel-rs for example. You do have to configure MYSQLCLIENT_NO_PKG_CONFIG=true and MYSQLCLIENT_LIB_DIR=/path also to prevent pkgconfig from running and still getting the needed information.

BlackDex commented 3 years ago

Going to close this one, since i have fixed this by creating a correct mysqlclient.pc which then trigger this package to build correctly and statically.