Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change output directory for a target

Tags:

xcode

xcode4

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.

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.

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

Thanks!

like image 613
Kuldeep Kapade Avatar asked Jun 15 '12 18:06

Kuldeep Kapade


People also ask

How do I change the output path?

Right-click on the project node in Solution Explorer and select Properties. Expand the Build section, and select the Output subsection. Find the Base output path for C#, and type in the path to generate output to (absolute or relative to the root project directory), or choose Browse to browse to that folder instead.

What is an output directory?

output directory. [ESRI software] In ArcIMS, the folder designated during installation to hold files being served to users for display in a browser.

What does Copy to Output Directory do?

"Copy to Output Directory" is the property of the files within a Visual Studio project, which defines if the file will be copied to the project's built path as it is. Coping the file as it is allows us to use relative path to files within the project.


1 Answers

  1. Go to File -> Project Settings.

  2. 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.

  3. 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.

like image 173
Jeff Sternberg Avatar answered Sep 20 '22 05:09

Jeff Sternberg