[Cmake] Generating code during the build: Fluid FLTK

Luis Ibanez ibanez at choroid.cs.unc.edu
Thu Nov 29 02:12:13 EST 2001


Hi,

I'm adding a new command:   cmFLTKWrapUICommand

It is intended to support the code generation from
FLTK .fl files. These files contain the specification
of the GUI created interactively with "Fluid".

A command like

  fluid -c  -h myGUI.h  -o myGUI.cxx myGUI.fl

will generate the .h and .cxx files using information
from the .fl file.

The command is to be used with two SourceList:

FLTK_WRAP_UI( FluidGUISourceList GeneratedCxxSourceList)

the first source list should contain all the .fl
file of the application. When run this command
will generate the names for the .cxx and .h files
and insert them in the second SourceList.

The command was based on cmQTWrapUICommand, but
a number of changes where done. In particular
concerninng the use of AddCustomCommand().

There is however a problem with the creation of
the customCommand in m_Makefile. The method
verifies if the target in question already
exists or not.  In this case the targets
are the .cxx and .h generated files. A for that
reason this new command is inserting directly
the .cxx and .h as targets of the built.


In order to support these files as a Type of
targets was added to cmTarget: "GENERATED_CODE".

A residual problem is appearing with the
custom rule for the .h file, its rule
is missing in the Makefile (under Linux).
It seems that somewhere in the process
the fils with .h extension are ignored as
targets... The Custom rule for .cxx is working
ok.


Any suggestions ?

Thanks,

Luis



-- 
Luis Ibanez                                      CB#:   7060
Research Assistan Professor                      phone: (919) 843 5436
Division of Neurosurgery                         fax:   (919) 966 6627
University of North Carolina at Chapel Hill      email: ibanez at cs.unc.edu
Chapel Hill, NC 27599-7060                       http://www.cs.unc.edu/~ibanez





More information about the CMake mailing list