如果使用xcodebuild设置CONFIGURATION_BUILD_DIR,则找不到库头

ldi*_*ual 5 header xcodebuild static-libraries ios restkit

我的iOS项目使用RestKit作为静态库(在GIT子模块中).

当我做:

xcodebuild -project myproject.xcodeproj -configuration Debug
Run Code Online (Sandbox Code Playgroud)

一切顺利.但是,当我更改输出目录时:

xcodebuild -project myproject.xcodeproj -configuration Debug CONFIGURATION_BUILD_DIR=build
Run Code Online (Sandbox Code Playgroud)

xcodebuild找不到我的库头文件:

/path/to/my/project/file.m:9:9: fatal error: 'RestKit/RestKit.h' file not found
#import <RestKit/RestKit.h>
        ^
1 error generated.
Run Code Online (Sandbox Code Playgroud)

这里发生了什么?


编辑

经过一些调查,我发现在添加时CONFIGURATION_BUILD_DIR=build,xcodebuild根本不会从RestKit复制头文件.

不使用CONFIGURATION_BUILD_DIR:

CpHeader Code/RestKit.h ...
Run Code Online (Sandbox Code Playgroud)

使用CONFIGURATION_BUILD_DIR:没有.