mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 11:31:37 +08:00
revert SQLITE_FLAGS back to LIBSQLITE3_FLAGS
This commit is contained in:
parent
46d91cd2b6
commit
5ed085fe46
@ -131,7 +131,7 @@ You can adjust this behavior in a number of ways:
|
|||||||
version = "0.24.2"
|
version = "0.24.2"
|
||||||
features = ["bundled"]
|
features = ["bundled"]
|
||||||
```
|
```
|
||||||
* When using the `bundled` feature, the build script will honor `SQLITE_MAX_VARIABLE_NUMBER` and `SQLITE_MAX_EXPR_DEPTH` variables. It will also honor a `SQLITE_FLAGS` variable, which can have a format like `"-USQLITE_ALPHA -DSQLITE_BETA SQLITE_GAMMA ..."`. That would disable the `SQLITE_ALPHA` flag, and set the `SQLITE_BETA` and `SQLITE_GAMMA` flags. (The initial `-D` can be omitted, as on the last one.)
|
* When using the `bundled` feature, the build script will honor `SQLITE_MAX_VARIABLE_NUMBER` and `SQLITE_MAX_EXPR_DEPTH` variables. It will also honor a `LIBSQLITE3_FLAGS` variable, which can have a format like `"-USQLITE_ALPHA -DSQLITE_BETA SQLITE_GAMMA ..."`. That would disable the `SQLITE_ALPHA` flag, and set the `SQLITE_BETA` and `SQLITE_GAMMA` flags. (The initial `-D` can be omitted, as on the last one.)
|
||||||
|
|
||||||
* When linking against a SQLite library already on the system (so *not* using the `bundled` feature), you can set the `SQLITE3_LIB_DIR` environment variable to point to a directory containing the library. You can also set the `SQLITE3_INCLUDE_DIR` variable to point to the directory containing `sqlite3.h`.
|
* When linking against a SQLite library already on the system (so *not* using the `bundled` feature), you can set the `SQLITE3_LIB_DIR` environment variable to point to a directory containing the library. You can also set the `SQLITE3_INCLUDE_DIR` variable to point to the directory containing `sqlite3.h`.
|
||||||
* Installing the sqlite3 development packages will usually be all that is required, but
|
* Installing the sqlite3 development packages will usually be all that is required, but
|
||||||
|
@ -138,18 +138,18 @@ mod build_bundled {
|
|||||||
}
|
}
|
||||||
println!("cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH");
|
println!("cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH");
|
||||||
|
|
||||||
if let Ok(extras) = env::var("SQLITE_FLAGS") {
|
if let Ok(extras) = env::var("LIBSQLITE3_FLAGS") {
|
||||||
for extra in extras.split_whitespace() {
|
for extra in extras.split_whitespace() {
|
||||||
if extra.starts_with("-D") || extra.starts_with("-U") {
|
if extra.starts_with("-D") || extra.starts_with("-U") {
|
||||||
cfg.flag(extra);
|
cfg.flag(extra);
|
||||||
} else if extra.starts_with("SQLITE_") {
|
} else if extra.starts_with("SQLITE_") {
|
||||||
cfg.flag(&format!("-D{}", extra));
|
cfg.flag(&format!("-D{}", extra));
|
||||||
} else {
|
} else {
|
||||||
panic!("Don't understand {} in SQLITE_FLAGS", extra);
|
panic!("Don't understand {} in LIBSQLITE3_FLAGS", extra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("cargo:rerun-if-env-changed=SQLITE_FLAGS");
|
println!("cargo:rerun-if-env-changed=LIBSQLITE3_FLAGS");
|
||||||
|
|
||||||
cfg.compile("libsqlite3.a");
|
cfg.compile("libsqlite3.a");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user