What is $(inherited) in Xcode's search path settings?

后端 未结 4 1127
暗喜
暗喜 2020-12-04 21:24

What is the $(inherited) search path setting?

I\'ve modified the header and library search path settings regarding OpenSSL for iPad and this issue alon

4条回答
  •  悲哀的现实
    2020-12-04 21:53

    Example of Overriding build setting variables set on the Project or Target level by reassigning the value of that variable in a xcconfig file.

    // Variable set in the project file, previous level
    OTHER_LDFLAGS = -ObjC
    
    // lib.xcconfig
    OTHER_LDFLAGS = -framework Security
    

    ^ When compiling with this, the previous value of OTHER_LDFLAGS -ObjC is going to be overridden by the new value -framework Security.

    Example of Inheriting build setting variables set on the Project or Target level by appending to the previous value of that variable in a xcconfig file. Think of $(inherited) as a special variable that can be used to get the existing value of a variable so that assignment to same variable isn't destructive.

    // Variable set in the project file, previous level
    OTHER_LDFLAGS = -ObjC
    
    // lib.xcconfig
    OTHER_LDFLAGS = $(inherited) -framework Security
    

    ^ When compiling with this, the value of OTHER_LDFLAGS is going to be -ObjC -framework Security.

    Example found at https://pewpewthespells.com/blog/xcconfig_guide.html

提交回复
热议问题