Edit me

A golden rule of the modern workflow is: do not create projects with multiple targets. Instead create multiple projects and link them together via dependencies.

Setting up a complex project for the modern workflow

If you have a library and an executable, make them two separate projects.

mulle-sde init -m foundation/objc-developer -d mylib library
mulle-sde init -m foundation/objc-developer -d myexe executable

Your project layout would then look like this:

myproject
├── myexe
└── mylib

As you want to use the library with your executable, you add the library as a dependency to the executable:

cd myexe
mulle-sde dependency add --objc --github "${GITHUB_USERNAME:-nobody}" mylib

The GITHUB_USERNAME can be fake, but it is needed to create a URL for the library project, just in case you want to distribute your executable later. It can also be changed later.

With mulle-sde dependency list or the more low-level mulle-sourcetree list -ll you can see the dependency structure of your project.

address             marks                                           aliases  include
-------             -----                                           -------  -------
Foundation          no-singlephase
Foundation-startup  no-dynamic-link,no-header,no-intermediate-link
mylib               no-singlephase

At this point you’re ready to craft again.

mulle-sde craft

And there you are.

Next

Add a third party dependency to your project.

Tags: