[CMake] Interresting dependency problem

Hendrik Sattler post at hendrik-sattler.de
Wed Sep 26 22:26:32 EDT 2007


Am Donnerstag 27 September 2007 schrieb Félix C. Morency:
> 1. What solution do you think is the best: "A main master script" that
> knows every dependencies of every projects VS "Completly indenpendant build
> script" that we could simply include if we need them and their dependencies
> ? Please justify.

If these are independent solutions, then there is no real choice. If there is 
such one, then they are not really independent and you could use the simplest 
approach of a master script.

> 2. How can I achieve the first solution with CMake ? (Is it possible ?)

You can let cmake write another cmake script with SET statements that you 
include in yet another cmake script.

> 3: Is there any better solution that I don't see ?

Yes.

Every solution comes down to a classic common thing: a development kit for C 
(used by B) and B (used by A).
An automatically written cmake script is one solution (somewhat limiting the 
dependent build environments to cmake) or something else like pkgconfig, or 
shell scripts that set environment variables, or whatever. Very much depends 
on the target audience and personal preferences.

HS


More information about the CMake mailing list