[CMake] QT_WRAP_UI does not generate .h and .cxx files

Matthieu Brucher matthieu.brucher at gmail.com
Tue Dec 19 11:56:45 EST 2006


I had the same issue, solved by upgrading to the last version of cmake.

2006/12/19, Tim Cramer <tim.cramer at iem.rwth-aachen.de>:
>
> Hi all,
>
> i have got a problem with the QT_WRAP_UI command. It does not generate
> the required .h and .cpp files.
>
>
> CMakeLists.txt:
>
> SET(TRINITY_REAL_SRCS
> aboutdlgimpl.cc
> images.c
> DObjTree.cc
> ViewDlgData.cc
> displaymanager.cc
> displayobjsbase.cc
> gltext.cc
> qtstuff.cc
> userinterface.cc
> DObjTreeData.cc
> configmanager.cc
> displayobjmodi.cc
> displayobjshelpers.cc
> helpers.cc
> pngimage.cc
> searchpath.cc
> ViewDlg.cc
> displayglobal.cc
> displayobjs.cc
> evalmsg.cc
> introDlg.cc
> pyinterpreter.cc
> textinterface.cc
> trinitypython.c
> nview.cc
> )
>
> SET(MOC_SRCS
> qtstuff.cc
> ViewDlg.cc
> ViewDlgData.cc
> introDlg.cc
> DObjTree.cc
> DObjTreeData.cc
> aboutdlgimpl.cc
> )
>
> SET(TRINITY_UI
> ui_trinityabout.ui
> )
>
> ADD_DEFINITIONS( ${QT_DEFINITIONS} )
>
> IF(QT_MOC_EXECUTABLE)
>   SET ( QT_WRAP_CPP "YES")
> ENDIF(QT_MOC_EXECUTABLE)
>
> SET(QT_WRAP_UI "YES")
>
> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
>
> QT_WRAP_UI(trinity_ui_lib ui_trinityabout.h ui_trinityabout.cc
> ${TRINITY_UI})
> QT_WRAP_CPP(trinity_moc_lib moc_ ${MOC_SRCS})
>
> #ADD_LIBRARY (trinity_ui_lib STATIC ${TRINITY_UI})
>
> ADD_EXECUTABLE(iMOOSE.trinity.real ${TRINITY_REAL_SRCS} )
> TARGET_LINK_LIBRARIES(iMOOSE.trinity.real png jpeg z Xft mng iMOOSE
> trinity_ui_lib pyfempool pyfemmesh pyfilehandlers pymatprops
> ${QT_LIBRARY} )
>
>
> The failure I get is:
>
> Building CXX object
> source/trinity/base/CMakeFiles/iMOOSE.trinity.real.dir/aboutdlgimpl.o
> /usr/bin/g++-3.4.6   -DOORELEASESTR=\"test\" -DOOVERSSTR=\"0.97\"
> -I/opt/mtl -I/opt/itl -I/home/raid1/lange/Cramer/cmake/oovr/source
> -I/usr/X11R6/include -I/usr/include/python2.4
> -I/home/raid1/lange/Cramer/cmake/oovr/source/trinity/base   -DQT_SHARED
> -DQT_NO_DEBUG -DQT_DLL -o
> source/trinity/base/CMakeFiles/iMOOSE.trinity.real.dir/aboutdlgimpl.o -c
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc
> In file included from
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:3:
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.h:2:29:
> ui_trinityabout.h: No such file or directory
> In file included from
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:3:
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.h:6:
> error: expected class-name before '{' token
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.h:7:
> error: ISO C++ forbids declaration of `Q_OBJECT' with no type
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.h:11:
> error: expected `)' before '*' token
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:7:20:
> qlabel.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:8:25:
> qpushbutton.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:9:24:
> qtabwidget.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:10:26:
> qtextbrowser.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:11:21:
> qwidget.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:12:21:
> qlayout.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:13:22:
> qvariant.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:14:22:
> qtooltip.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:15:24:
> qwhatsthis.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:16:29:
> qmultilineedit.h: No such file or directory
>
> /home/raid1/lange/Cramer/cmake/oovr/source/trinity/base/aboutdlgimpl.cc:19:
> error: expected `)' before '*' token
> make[2]: ***
> [source/trinity/base/CMakeFiles/iMOOSE.trinity.real.dir/aboutdlgimpl.o]
> Error 1
>
> So why don't I get the header?
>
> Thank you for your help.
>
>
> Tim
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
PS : Le club www.developpez.com met à disposition gratuitement tous les
services utiles aux développeurs : newsletter, magazine, actualités, cours,
tutoriels, articles, FAQ's, tests, comparatifs, débats, sondages, outils,
sources, composants et exemples de codes, les BLOGs des développeurs, et
l'hébergement gratuit de sites pour développeurs.
www.developpez.com est la communauté en langue française qui concentre le
plus de développeurs professionnels :
- Jusqu'à 80 000 visites par jour
- Plus de 900 000 développeurs distincts fréquentent au moins une fois par
mois www.developpez.com
- Le forum d'entraide des développeurs est le plus actif dans son domaine
avec plus de 5000 messages par jour
- La plus grande équipe de rédaction bénévole : plus de 200 auteurs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061219/c2c053a2/attachment.htm


More information about the CMake mailing list