Skip to content

Instantly share code, notes, and snippets.

@jontow
Created February 10, 2017 18:42
Show Gist options
  • Save jontow/08368ca41c2dd203179db5f000be19df to your computer and use it in GitHub Desktop.
Save jontow/08368ca41c2dd203179db5f000be19df to your computer and use it in GitHub Desktop.
^:jontow@studio:~/.cargo/git/checkouts/opencv-rust-fd92406e8846f421/4ac0211% git diff
diff --git a/build.rs b/build.rs
index ecef9c7..dd0c738 100644
--- a/build.rs
+++ b/build.rs
@@ -301,9 +301,9 @@ fn fix_lib_png(out_dir: &str) -> BuildResult<()> {
}
fn find_opencv_libs(out_dir: &str) -> BuildResult<(pkg_config::Library, PathBuf)> {
- let pkg_config_path = format!("{}:{}/dist/lib/pkgconfig",
- env::var(PKG_CONFIG_PATH_ENV_VAR).unwrap_or("/usr/local/lib/pkgconfig/".to_string()),
- &out_dir);
+ let pkg_config_path = format!("{}/dist/lib/pkgconfig:{}",
+ &out_dir,
+ env::var(PKG_CONFIG_PATH_ENV_VAR).unwrap_or("/usr/local/lib/pkgconfig/".to_string()));
env::set_var(PKG_CONFIG_PATH_ENV_VAR, &pkg_config_path);
pkg_config::Config::new()
.statik(true)
@@ -451,4 +451,4 @@ fn cargo_file_content() -> BuildResult<String> {
.map_err(|e| format!("Failed to read config file {} with error: {}.", CARGO_FILE_PATH, e) )
.map(|_| contents)
})
-}
\ No newline at end of file
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment