Skip to content

Commit

Permalink
sdl2-sys: Avoid to add unwanted system folder in library research paths
Browse files Browse the repository at this point in the history
Default pkg-config-rs behavior is to add default system library paths (ex:
-L/usr/lib/x86_64-linux-gnu).

This is because PKG_CONFIG_ALLOW_SYSTEM_LIBS is set by pkg-config-rs by
default. print_system_libs(false) disable this behavior.

More details in evdev-rs project:
ndesh26/evdev-rs#85
  • Loading branch information
rofferom committed Feb 10, 2022
1 parent b36d048 commit 40ccddf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sdl2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fn init_submodule(sdl_path: &Path) {
#[cfg(feature = "use-pkgconfig")]
fn pkg_config_print(statik: bool, lib_name: &str) {
pkg_config::Config::new()
.print_system_libs(false)
.statik(statik)
.probe(lib_name)
.unwrap();
Expand Down

0 comments on commit 40ccddf

Please sign in to comment.