• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Adding externally managed sources to a project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding externally managed sources to a project


  • Subject: Adding externally managed sources to a project
  • From: David Mirabito <email@hidden>
  • Date: Sat, 15 Sep 2012 15:54:07 +0100

Hello List!

I am working on a project where there are a number of libs and one console application. It's cross platform and already it works with trusty old make + vim on both macos and linux, and clang or gcc work fine.

Recently I created a XCode workspace for the whole thing, and individual projects for each library and the application itself. I added the files as references to where they live in my working dir (which for historical reasons are managed under mercurial). So my project tree looks like

djm/
	djlibA
		.hg
		Makefile
		sources, headers, etc
		libdjA.a
	djlibB
		.hg
		Makefile
		sources, headers, etc
		libdjB.a
	myApp
		.hg
		Makefile
		sources, etc
		myExecutableApp
	XCode
		myProject.xcworkspace
		djLibA
			.git
			djLibA.xcodeproj
		djLibB
			.git
			djLibB.xcodeproj
		myApp
			,git
			myApp.xcodeproj

So each item under XCode/ ended up being it's own little git repo, but there's no code in there, just references to the files and XCode-specific build settings (like linking libreadline and djliba, djlibb, etc)

So far this works A-OK. (ignoring some double-echo issues with libreadline in the xcode stdio console..)

I am just wondering if there's any tips for this kind of workflow? In particular adding new files means dropping to a terminal, creating the .c or .h, then back to XCode and add references to the files. As the list grows, hunting for the non-grey (i.e. already referenced) and ignoring non-source files is becoming annoying and is error prone, as it can be easy to miss one, so XCode wont build or include it, etc.

Is there some way to tell a project to "reference all .c in this dir" without having to manually add files? Or some way I could 'make refresh' to poke the references in myself?

Note I still need to be able to pick up everything (except the XCode dir) and have them work on a Linux box, for example. But it's nice to be able to use the IDE and debugger, etc. And one day I'd like to pop in a cocoa GUI frontend to the libs as an alternative to the console executable.

I wouldn't be surprised if there's some nice which could help, and I am throwing it out there to try learn from others' experiences.

Thanks,
DavidM
 _______________________________________________
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

  • Follow-Ups:
    • Re: Adding externally managed sources to a project
      • From: Lee Ann Rucker <email@hidden>
    • Re: Adding externally managed sources to a project
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Correct way to compile and link derived sources?
  • Next by Date: Re: Adding externally managed sources to a project
  • Previous by thread: Re: Xcode folder for xcode-select
  • Next by thread: Re: Adding externally managed sources to a project
  • Index(es):
    • Date
    • Thread