File tree 3 files changed +32
-2
lines changed
3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -546,7 +546,11 @@ pbxProject.prototype.addToLibrarySearchPaths = function (file) {
546
546
buildSettings [ 'LIBRARY_SEARCH_PATHS' ] = [ INHERITED ] ;
547
547
}
548
548
549
- buildSettings [ 'LIBRARY_SEARCH_PATHS' ] . push ( searchPathForFile ( file , this ) ) ;
549
+ if ( typeof file === 'string' ) {
550
+ buildSettings [ 'LIBRARY_SEARCH_PATHS' ] . push ( file ) ;
551
+ } else {
552
+ buildSettings [ 'LIBRARY_SEARCH_PATHS' ] . push ( searchPathForFile ( file , this ) ) ;
553
+ }
550
554
}
551
555
}
552
556
@@ -590,7 +594,11 @@ pbxProject.prototype.addToHeaderSearchPaths = function (file) {
590
594
buildSettings [ 'HEADER_SEARCH_PATHS' ] = [ INHERITED ] ;
591
595
}
592
596
593
- buildSettings [ 'HEADER_SEARCH_PATHS' ] . push ( searchPathForFile ( file , this ) ) ;
597
+ if ( typeof file === 'string' ) {
598
+ buildSettings [ 'HEADER_SEARCH_PATHS' ] . push ( file ) ;
599
+ } else {
600
+ buildSettings [ 'HEADER_SEARCH_PATHS' ] . push ( searchPathForFile ( file , this ) ) ;
601
+ }
594
602
}
595
603
}
596
604
// a JS getter. hmmm
Original file line number Diff line number Diff line change @@ -28,6 +28,17 @@ exports.addAndRemoveToFromHeaderSearchPaths = {
28
28
}
29
29
test . done ( ) ;
30
30
} ,
31
+ 'add should not mangle string arguments and add to each config section' :function ( test ) {
32
+ var includePath = '../../some/path' ;
33
+ proj . addToHeaderSearchPaths ( includePath ) ;
34
+ var config = proj . pbxXCBuildConfigurationSection ( ) ;
35
+ for ( var ref in config ) {
36
+ if ( ref . indexOf ( '_comment' ) > - 1 || config [ ref ] . buildSettings . PRODUCT_NAME != PRODUCT_NAME ) continue ;
37
+ var lib = config [ ref ] . buildSettings . HEADER_SEARCH_PATHS ;
38
+ test . ok ( lib [ 1 ] . indexOf ( includePath ) > - 1 ) ;
39
+ }
40
+ test . done ( ) ;
41
+ } ,
31
42
'remove should remove from the path to each configuration section' :function ( test ) {
32
43
var libPath = 'some/path/include' ;
33
44
proj . addToHeaderSearchPaths ( {
Original file line number Diff line number Diff line change @@ -28,6 +28,17 @@ exports.addAndRemoveToFromLibrarySearchPaths = {
28
28
}
29
29
test . done ( ) ;
30
30
} ,
31
+ 'add should not mangle string arguments and add to each config section' :function ( test ) {
32
+ var libPath = '../../some/path' ;
33
+ proj . addToLibrarySearchPaths ( libPath ) ;
34
+ var config = proj . pbxXCBuildConfigurationSection ( ) ;
35
+ for ( var ref in config ) {
36
+ if ( ref . indexOf ( '_comment' ) > - 1 || config [ ref ] . buildSettings . PRODUCT_NAME != PRODUCT_NAME ) continue ;
37
+ var lib = config [ ref ] . buildSettings . LIBRARY_SEARCH_PATHS ;
38
+ test . ok ( lib [ 1 ] . indexOf ( libPath ) > - 1 ) ;
39
+ }
40
+ test . done ( ) ;
41
+ } ,
31
42
'remove should remove from the path to each configuration section' :function ( test ) {
32
43
var libPath = 'some/path/poop.a' ;
33
44
proj . addToLibrarySearchPaths ( {
You can’t perform that action at this time.
0 commit comments