Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I "make install" via xcode?

I have an xcode project that builds a library from C/C++ sources for OSX. Is there a way to get xcode to install the library and its header files into /usr/local/lib?

I have the following settings under Target > Build Settings:

  • Deployment
    • Deployment Location = Yes
    • Deployment Postprocessing = Yes
    • Installation Build Products Location = /tmp/projname.dst
    • Installation Directory = /usr/local/lib
    • Skip Install = No

When I do Product > Build, it puts the resulting .a and adds the public headers into an include/ subfolder in the /tmp/projname.dst/ folder. But I come from the land of Makefiles and I'd like to have the equivalent of "make install" here (I expect it to ask me for permissions when it tries to put things into /usr/local/include/ and /usr/local/lib/)

like image 383
codedread Avatar asked Feb 03 '13 19:02

codedread


People also ask

How long does Xcode take to install on Mac?

Installation takes 8 minutes on a 2021 Mac M1 Mini, with a 100Mbps Internet connection. It's significantly slower on Mac Intel over a slow Internet connection.

Why does it take Xcode so long to install?

Why does Xcode take forever to install? Xcode is a huge app. Verifying and expanding it takes a really long time. Even with a fast Internet connection, it will take 1–2 hours to install Xcode.


1 Answers

It looks like "xcodebuild install" is how you do this.

like image 115
Darce Oded Avatar answered Oct 15 '22 07:10

Darce Oded