[Cmake] cmake 1.8.1 does not create .cpp files

Bitter, Ingmar (NIH/CC/DRD) IBitter at cc . nih . gov
Wed, 24 Sep 2003 11:44:59 -0400


Hi,

I also reported this as bug # 192, but maybe someone knows a quick fix for
this:

I use QT_WRAPP_UI in the following way:
(CMake 1.8.1, MS VC++ 6.0, WinXP pro)

SET(_ui_files
C:/cvs/nav/src/ui/bigViewer.ui
C:/cvs/nav/src/ui/mainWindow.ui
)
SET(my_ui_h_files
bigViewer.h
mainWindow.h
)
QT_WRAP_UI ( _ui _h_files _cpp_files _ui_files )
QT_WRAP_CPP( _ui _moc_files my_h_files )
ADD_LIBRARY( _ui STATIC _moc_files )
LINK_LIBRARIES( _ui )

my_h_files is necessary to circumvent bug 186.

CMakeSetup runs fine with this. Compiling the project now creates from the
.ui the corresponding .h using uic and .cxx using moc.
Unfortunately, it does not generate the corresponding .cpp that should be
created using uic from the .ui and the .h. In addition, the .cpp is not part
of the project file list.

Consequently, I get undefined symbols for all the functions that would be in
those generated .cpp files :-(

-Ingmar

Ingmar Bitter, Ph.D.     Diagnostic Radiology Department 
Staff Scientist          Clinical Center
Tel:(301) 435-2155       National Institutes of Health
Fax:(301) 496-9933       9000 Rockville Pike, Bethesda, MD 20892