如何更改目标的输出目录 [英] How to change output directory for a target

查看:32
本文介绍了如何更改目标的输出目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个工作区,其中有一个主应用程序项目,然后是一个由主应用程序使用的静态库项目.我希望静态库项目将 libX.a 吐出到主应用程序项目目录中,因为我想将此 libX.a 推送到我的 Git 存储库中.

I am using a workspace where I have a main app project and then a static library project which is used by the main app. I want static library project to spit out libX.a into the main app project directory, because i want to push this libX.a into my Git repo.

静态库项目的构建路径设置的更改应推送到其自己的git repo,以便其他人不必一次又一次地处理此更改.

The changing of build path settings for static lib project should be pushed to its own git repo so other don't have to deal with this change again and again.

我尝试将 mt 静态库目标的构建产品路径"更改为$(SRCROOT)/../SharedData",但没有任何效果.

I tried changing 'Build Products Path' to "$(SRCROOT)/../SharedData" for mt static lib target but it doesn't have any effect.

谢谢!

推荐答案

  1. 转到文件 -> 项目设置.

  1. Go to File -> Project Settings.

单击派生数据位置下的高级按钮.建设中位置选择自定义并选择您的输出目录.这会将变量 $(BUILD_DIR) 更改为您在该字段中设置的任何内容.

Click the Advanced button under Derived Data Location. Under build location select custom and choose your output directory. This will change the variable $(BUILD_DIR) to whatever you set in that field.

点击完成并转到您的目标设置.在构建位置下,您现在可以指定目标的输出位置$(BUILD_DIR) 宏.

Click done and go to your target settings. Under Build Location you can now specify where the targets are output based on that $(BUILD_DIR) macro.

这篇关于如何更改目标的输出目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆