External Dependencies

External dependency (exdep) is a code tree somewhere outside of the project directory. This can be a remote repository, or some fixed location on the current machine. Cook projects can define their external dependencies in the configuration file (you can use your ordinary configuration file or a special deps.conf file). The identifier for this is project.dependencies. It's value should consist of whitespace-separated desriptors list:

  project.dependencies: "git@github.com:gecko0307/dlib local:/home/user/libfoo";

Currently, two dependency types are supported: git (remote Git repository) and local (local path on disk). When using Git, you should specify server name (github.com in the example above) and repository path in the form user/repository. Local exdeps require only path.

When building, Cook will aumatically fetch remote code, generate corresponding import paths for the compiler, build that code and link it together with the project. All remote code and object files are located in .cook/remote in user's home directory. Directory names are generated by computing CRC-32 hashes for exdep desriptors (for example, 4A476DBC), so it is essential for descriptors to be free of any redundant characters.

For performance reasons, Cook by default doesn't update it's cloned Git repositories on every build. Global update is initiated when running with --rebuild parameter.

deps.conf can be used in exdep's root directory to specify it's own dependencies. Circular dependencies are permitted.