[CMake] Using fluid, fltk, cmake and own headers

Atwood, Robert C r.atwood at imperial.ac.uk
Tue Aug 28 13:13:06 EDT 2007


Hi, 
I have a bit of a problem, which I can work around but would rather not
have to... I am using FLUID to make a FLTK interface, at this point just
to read some data into a customized structure. The structure definition
is in my header file 'eletable.h' in the source directory. The FLUID
file is called 'tabinter.fl' 

I am attempting to do this by including an 'eletable' as a member of a
class, added by using the fluid program. To do this I added code 
#include "eletable.h" 

Using the Fluid menu. 

However, when I try to make the project with cmake, the tabinter.{cxx,h}
files are generated in the build directory, and the compiler cannot then
seem to locate the source directory where the 'eletable.h' file is
located. 

It builds correctly if the project is built IN the source tree. However,
due to using ITK and friends I have gotten to prefer building outside
the source tree if possible. 
How can the step which compiles the .cxx and .h file generated by FLUID
be set to include the source tree, whatever it is? I can include the
path manually but that does not help if for example, the files are
stored in a directory with a different name. 
Thanks for any advice
Robert



Here's my CmakeLists.txt file

PROJECT(WIRS)

FIND_PACKAGE(FLTK)
IF(FLTK_FOUND)
  INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ENDIF(FLTK_FOUND)


FLTK_WRAP_UI(wirs tabinter.fl)
ADD_EXECUTABLE(wirs  ${wirs_FLTK_UI_SRCS} wirsMain.cxx calcweights.cxx
element.cxx eletable.cxx etable.cxx readdata.cxx)

TARGET_LINK_LIBRARIES(wirs  fltk)


 


More information about the CMake mailing list