File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,8 @@ impl Config {
328
328
}
329
329
330
330
fn command ( & self , name : & str , args : & [ & str ] ) -> Command {
331
- let mut cmd = Command :: new ( "pkg-config" ) ;
331
+ let exe = env:: var ( "PKG_CONFIG" ) . unwrap_or ( String :: from ( "pkg-config" ) ) ;
332
+ let mut cmd = Command :: new ( exe) ;
332
333
if self . is_static ( name) {
333
334
cmd. arg ( "--static" ) ;
334
335
}
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ static LOCK: StaticMutex = MUTEX_INIT;
11
11
12
12
fn reset ( ) {
13
13
for ( k, _) in env:: vars ( ) {
14
- if k. contains ( "PKG_CONFIG" ) || k. contains ( "DYNAMIC" ) ||
15
- k. contains ( "STATIC" ) {
14
+ if k. contains ( "DYNAMIC" ) ||
15
+ k. contains ( "STATIC" ) ||
16
+ k. contains ( "PKG_CONFIG_ALLOW_CROSS" ) ||
17
+ k. contains ( "FOO_NO_PKG_CONFIG" ) {
16
18
env:: remove_var ( & k) ;
17
19
}
18
20
}
You can’t perform that action at this time.
0 commit comments