[Kde-bindings] dependencies between generator and smoke
Arno Rehn
arno at arnorehn.de
Wed Nov 4 21:29:02 UTC 2009
On Wednesday 04 November 2009 18:04:55 Ian Monroe wrote:
> On Wed, Nov 4, 2009 at 3:51 AM, Petr Vanek <petr at scribus.info> wrote:
> > hi all,
> >
> > just for your information: we faced some strange errors in our
> > bindings last days. It was caused by old smoke library, which was not
> > recompiled after some qt's smokeconfig.xml and generator changes. It
> > had to be rebuilt manually (and it was forgotten of course).
> >
> > If you are interested in my solution see this diff:
> >
> > Index: smoke/qt/CMakeLists.txt
> > ===================================================================
> > --- smoke/qt/CMakeLists.txt (revision 2862)
> > +++ smoke/qt/CMakeLists.txt (working copy)
> > @@ -39,6 +39,8 @@
> > COMMAND generator
> > ARGS -config "${CMAKE_CURRENT_BINARY_DIR}/config.xml" -
> > smokeconfig "${CMAKE_CURRENT_SOURCE_DIR}/smokeconfig.xml"
> > -- ${CMAKE_CURRENT_SOURCE_DIR}/qt_includes.h
> > + MAIN_DEPENDENCY smokeconfig.xml
> > + DEPENDS cppparser generator_smoke generator
> > WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
> >
> > macro_add_file_dependencies( ${CMAKE_CURRENT_BINARY_DIR}/
> > smokedata.cpp ${CMAKE_CURRENT_BINARY_DIR}/x_1.cpp )
> >
> > I don't know if it's acceptable for main kde-bindings trunk, but it's
> > working for us
Yep, thanks for the info. I'll add that before 4.4 is released, but there's
still a lot of other stuff to do ;)
> I've dealt with generation and cmake before, this is what your supposed to
> do.
>
> But you should give the dependencies their full path, eg
> ${CMAKE_CURRENT_SOURCE_DIR}/smokeconfig.xml
As long as there's no target or custom command named "smokeconfig.xml" that
shouldn't be a problem.
Btw, is there any convention for KDE cmake files? Currently we have a lot of
mixed all-uppercase and all-lowercase cmake code in kdebindings. It would be
nice if this could be unified.
--
Arno Rehn
arno at arnorehn.de
More information about the Kde-bindings
mailing list