[Insight-users] CMAKE command to link Fltk (fluid) in a code

Alexandre gouaillard alexandre.gouaillard at insa-lyon.fr
Fri Jul 23 05:47:55 EDT 2004


thanks luis

Note that from the code you copy/pasted , there is some command not 
understood by my CMAKE 2.0 :
ADD_GUI_EXECUTABLE, ITK_DISABLE_FLTK_GENERATED_WARNINGS
I couldn't check if these were valid command of CMAKE 2.0 as only the CMAKE 
1.8x commands are listed on the CMAKE website (as far as i searched).

well, changing the ADD_GUI_.... to ADD_... worked fine and i just commented 
out the second command.

Then, in my project , there is only the .cxx file made by FLUID and nothing 
else.
Thus, If i create the project like you recommend one to do it will look 
like that:

ADD_EXECUTABLE(Cylinder CylinderGUI.cxx)
FLTK_WRAP_UI(Cylinder CylinderGUI.fl)
TARGET_LINK_LIBRARIES(Cylinder itkCommon fltkdll .........)

In that case, the file CylinderGUI.cxx appears twice in the project and the 
project is not valid.

I know that, acording to the tao of programming, I should have my process 
and my GUI appart from each other,
and that my actual project doesn't really make sense, but let's say that 
for political reasons (this is not my code)
I have to do this way ... for now.

Is there a cannonical way to do what I'm trying to do ?
I m thinking about calling the Fluid executable to build the .cxx file 
prior to the executable declaration ...
Of course i could make a blank foo.cxx file and add it when declaring the 
project , but that solution would be a little bit too "quick and nasty".

alex.






More information about the Insight-users mailing list