rename buildtime_bindgen to buildtime-bindgen
MODIFY
Cargo.toml
Cargo.toml
@@ -34,7 +34,7 @@ matches = "0.1"
[features]
default = ["opencv-34"]
-buildtime_bindgen = []
+buildtime-bindgen = []
opencv-32 = []
opencv-34 = []
opencv-41 = []

MODIFY
README.md
README.md
@@ -141,7 +141,7 @@ The crate itself, as imported by users, consists of generated rust
code in [src](src) committed to the repo. This way, users don't have
to handle the code generation overhead in their builds. When
developing this crate, you can test changes to the binding generation
-using `cargo build -vv --features buildtime_bindgen`. When changing
+using `cargo build -vv --features buildtime-bindgen`. When changing
the codegen, be sure to push changes to the generated code!
`hdr_parser.py` comes from OpenCV python/java generator. We've tried

MODIFY
build.rs
build.rs
@@ -114,7 +114,7 @@ fn build_wrapper(opencv_header_dir: &PathBuf) -> Result<(), Box<dyn Error>> {
eprintln!("Using OpenCV headers from: {}", opencv_dir.display());
eprintln!("Generating code in: {}", out_dir_as_str);
- if cfg!(feature = "buildtime_bindgen") {
+ if cfg!(feature = "buildtime-bindgen") {
eprintln!("Placing generated bindings into: {}", hub_dir.display());
}
@@ -252,7 +252,7 @@ fn build_wrapper(opencv_header_dir: &PathBuf) -> Result<(), Box<dyn Error>> {
panic!();
}
- if cfg!(feature = "buildtime_bindgen") {
+ if cfg!(feature = "buildtime-bindgen") {
let e = Command::new("sh")
.current_dir(&out_dir)
.arg("-c")
@@ -308,7 +308,7 @@ fn build_wrapper(opencv_header_dir: &PathBuf) -> Result<(), Box<dyn Error>> {
gcc.compile("ocvrs");
- if cfg!(feature = "buildtime_bindgen") {
+ if cfg!(feature = "buildtime-bindgen") {
if !module_dir.exists() {
fs::create_dir(&module_dir)?;
}

rename buildtime_bindgen to buildtime-bindgen