[CMake] How to set subdir in CMakeListes.txt?

Chunyan Jiang chunyan.jiang at gmail.com
Wed Dec 21 12:50:39 EST 2005


Dear all,

I want to build one project by using fltk, itk, vtk under visual
studio 6. I use CMake 2.2 to configer my files. I want to organize my
files in some sub folders, such as UIFiles, ProcessFiles.

I put my .fl in the sub folder of the project. But when I build the
project, the generated source .cxx and .h of .fl are not in sub folder
as .fl, but in project folder.

Furthermore, I get the following warning message:
In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of
source files that should be added to your executable or library. It
appears that you have not added these source files to your target. You
should change your CMakeLists.txt file to directly add the generated
files to the target...

In my CMakeLists.txt, I set it as:
# The FL files for Project
SET(APPLICATION_FLUIDS
  UserInterface/projectGUI.fl
)

IF(FLTK_FOUND)
     FLTK_WRAP_UI(MyProject ${APPLICATION_FLUIDS})
ENDIF(FLTK_FOUND)


It seems that it doesn't work. How to figure it?

Thanks a lot!

Chunyan


More information about the CMake mailing list