使用xcodebuild分离构建目录 [英] Separate build directory using xcodebuild
问题描述
xcodebuild
的手册页显示:
从目录运行xcodebuild 包含您的项目(即 包含 projectname.xcodeproj软件包).
Run xcodebuild from the directory containing your project (i.e. the directory containing the projectname.xcodeproj package).
我想保持源目录(Subversion的外部目录)干净且未修改,并将目标文件和可执行文件构建到完全不在源目录之外的位置.
I would like to keep my source directory (which is a Subversion external) clean and unmodified, and build my object files and executables to a location completely outside of the source directory.
是否有任何方法可以像使用make
工具甚至在Windows上使用msbuild
一样,使用xcodebuild
从终端构建到单独的构建目录中?
Is there any way to build into a separate build directory from a terminal using xcodebuild
like you can do with make
tools or even msbuild
on Windows?
推荐答案
您可以从命令行设置构建设置. CONFIGURATION_BUILD_DIR
将设置构建目录.例如:
You can set build settings from the command line. The CONFIGURATION_BUILD_DIR
will set the build directory. For example:
xcodebuild -project YourProject.xcodeproj -configuration Debug -target All ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=../some/other/dir
在Apple网站上可以找到参考:
A reference is found on Apple's site:
这篇关于使用xcodebuild分离构建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!