[Kde-bindings] dependencies between generator and smoke

Ian Monroe ian.monroe at gmail.com
Wed Nov 4 17:04:55 UTC 2009


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
>

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

Ian



More information about the Kde-bindings mailing list