Re: "Installing" iOS libraries
Re: "Installing" iOS libraries
- Subject: Re: "Installing" iOS libraries
- From: Bill Garrison <email@hidden>
- Date: Sat, 14 Jan 2012 10:22:01 -0500
On Jan 13, 2012, at 7:18 PM, Thomas Davie wrote:
> Hi there,
>
> I have a project that I'm working on that's split up into a number of libraries, I'm trying to figure out the best solution for installing libraries and headers so that I can use them without setting ugly paths into my home directory in the projects.
>
> I don't want to install to /usr because these are not Mac OS libraries that will work on my machine.
> I don't want to install into the SDK root because I get the impression these should always be virgin copies of the SDK, not messed with by users.
> I don't want them left in my home directory because that will cause every user to have to mess about changing references.
>
> What's my best approach here?
>
> Thanks
>
> Tom Davie
If you just need these headers and libraries for building the project, a reasonable approach is to pick one of the following locations:
/usr/local/
/opt/local/
These are the conventional locations on a Unix system for locating "stuff" that is added to the system. Within this directory, there's also a conventional layout:
${LOCAL}/include
${LOCAL}/lib
${LOCAL}/bin
or sometimes, the package is bundled up into its own subdirectory, e.g. with git:
${LOCAL}/git/include
${LOCAL}/git/lib
${LOCAL}/git/bin
see 'man hier' for the full story.
In Xcode, you'd add this to your header search path (and something analogous for library & framework search paths):
HEADER_SEARCH_PATHS = "$inherited" /usr/local/include/
LIBRARY_SEARCH_PATHS = "$inherited" /usr/local/lib/
----
Alternately, if you want users of your project to not require installing external libraries & headers, bundle all the external dependencies within your project directory. This approach has the advantage that your project will always be built with a known version of any external library/framework.
E.g.
${PROJECT_DIR}/Dependencies/
${PROJECT_DIR}/ThirdParty/
Then you can a project-relative path to your header/library/framework search paths and be done.
E.g.
HEADER_SEARCH_PATHS = "$inherited" "${PROJECT_DIR}/Dependencies/**"
Bill _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden