KDE/kdepim/kontact/plugins/kmail
Alexander Neundorf
neundorf at kde.org
Wed Aug 30 18:37:28 CEST 2006
On Wednesday 30 August 2006 10:14, Stephan Kulow wrote:
> Am Dienstag, 29. August 2006 20:41 schrieb Alexander Neundorf:
> > Now that you have the dep to kmailprivate added explicitely, you can
> > remove the header again from the list of sources.
>
> So just to summarize: the only solution for "source file A needs generated
> header file B" is "compile and link all of B's target before even trying
> other target that come close to A"? That is pretty much not what you expect
> to happen - anyway I can't test atm, I'll commit if it works.
The "normal" way to have cmake create the correct dependencies is to add the
files generated through an ADD_CUSTOM_COMMAND() to the list of sources for
the target (cmake 2.4.3).
But this works only if the target and the custom command are in the same
CMakeLists.txt (if I understood Brad correctly).
If they are in different directories, the second target which needs the
generated header needs to depend on a "top-level-target", which itself
depends on the generated file.
So either:
add_dependencies(kontact_kmailplugin kmailprivate)
(which will also enforce that kmailprivate is built completely before
kontact_kmailplugin)
or:
in kdepim/kmail/ add a helper target:
add_custom_target(kmail_headers
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/globalsettings_base.h)
and make the plugin depend on it in kontact/plguins/kmail:
add_dependencies(kontact_kmailplugin kmail_headers)
Then the plugin should really only depend on the generated header(s).
Bye
Alex
--
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org - http://www.kde.org
alex AT neundorf.net - http://www.neundorf.net
More information about the Kde-buildsystem
mailing list