[CMake] Re: Target flags depending on compilation of another target

Rodolfo Lima rodolfo at rodsoft.org
Fri Dec 21 07:24:43 EST 2007


Rodolfo Lima escreveu:

> Is there any way to make cmake support things like this? A common use
> case would be like... one of your targets is a custom target which
> compiles wxWidgets (for instance). When it gets installed, it creates a
> bash script (wx-config) which, when run, returns proper compiler and
> linker flags. Those flags are used by another target that has wxWidgets
> as dependency.

Just to clarify... when I said 'when it gets installed', I mean that
wxWidgets gets installed during the build, to a prefix inside the
CMAKE_CURRENT_BINARY_SOURCE, not in install time. I'm doing it this way
to make compilation of my project dumb-proof. If wxWidgets isn't
installed, we compile our version statically and use it. When the main
target is run, wxWidgets is compiled and installed to an internal
prefix, that is.

Regards,
rod



More information about the CMake mailing list