[Cmake] How to write a specific wrapper ?

Jean-Francois LECOMTE lecomte at litteral . fr
30 Oct 2003 17:06:49 +0100


Hi there,

I do like cmake but i didn't find any information on how to write a
plugin to create a wrapper...

I use Motif, and i have a compiler which use specific user interface
definition (.xwi) to create Motif (.h and .c) files...

I would like to have an equivalent to QT_WRAP_CPP for my specific case

In practice, what i want to do

toto.xwi -> toto.h toto.c


before compiling my project and add it to the executable.

I would like to write something that allow me to write

ADD_EXECUTABLE( myexee
                                   ...
                                  myexe_xwi_files)

SET( myexe_xwi_def 
        toto.xwi
        ...
       )        

XWI_WRAP_C ( myexe
                            myexe_xwi_files
                            myexe_xwi_def )

Could someone tell me how to do this ? using the cmCPluginAPI ? 
Maybe can i make it simplier using the 
ADD_CUSTOM_COMMAND ?

Any help would be appreciated !

Thanks

Jef
-- 
Jean-Francois LECOMTE <lecomte at litteral . fr>