[Kde-bindings] dependencies between generator and smoke
Ian Monroe
ian.monroe at gmail.com
Wed Nov 4 21:51:15 UTC 2009
On Wed, Nov 4, 2009 at 3:29 PM, Arno Rehn <arno at arnorehn.de> wrote:
> 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.
In that same command you give the full path, no reason it shouldn't
because its a dependency.
> 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.
I doubt it. :) I personally go lower case for function and macro
calls, and upper case for variables.
Ian
More information about the Kde-bindings
mailing list