
Originally Posted by
ChrisW67
The CMake Qt find module uses the Qt4 qmake: is it in the PATH?
Yes it is.
You could try this at the top of DemoUI/ CMakeLists.txt:
FIND_PACKAGE(Qt4 COMPONENTS QtSvg QtScript REQUIRED)
FIND_PACKAGE(Qt4 COMPONENTS QtSvg QtScript REQUIRED)
To copy to clipboard, switch view to plain text mode
Thank you very much! This worked to remove this particular error, but now I am getting the following error:
Scanning dependencies of target DemoUI
[ 58%] Building CXX object DemoUI/CMakeFiles/DemoUI.dir/GroupSelWidget.cpp.o
In file included from /home/samjnaa/sr/_repos/hg/cornucopia-lib/DemoUI/GroupSelWidget.cpp:21:0:
/home
/samjnaa
/sr
/_repos
/hg
/cornucopia
-lib
/DemoUI
/GroupSelWidget.
h:26:19: fatal error
: QWidget: No such
file or directory
#include <QWidget>
^
compilation terminated.
make[2]: *** [DemoUI/CMakeFiles/DemoUI.dir/GroupSelWidget.cpp.o] Error 1
make[1]: *** [DemoUI/CMakeFiles/DemoUI.dir/all] Error 2
make: *** [all] Error 2
Scanning dependencies of target DemoUI
[ 58%] Building CXX object DemoUI/CMakeFiles/DemoUI.dir/GroupSelWidget.cpp.o
In file included from /home/samjnaa/sr/_repos/hg/cornucopia-lib/DemoUI/GroupSelWidget.cpp:21:0:
/home/samjnaa/sr/_repos/hg/cornucopia-lib/DemoUI/GroupSelWidget.h:26:19: fatal error: QWidget: No such file or directory
#include <QWidget>
^
compilation terminated.
make[2]: *** [DemoUI/CMakeFiles/DemoUI.dir/GroupSelWidget.cpp.o] Error 1
make[1]: *** [DemoUI/CMakeFiles/DemoUI.dir/all] Error 2
make: *** [all] Error 2
To copy to clipboard, switch view to plain text mode
But I have the Qt headers installed (indeed I'm sure it would have complained earlier if I had not):
...
libqt4-dev
: /usr
/include
/qt4
/QtGui
/QWidget ...
$ dpkg -S QWidget
...
libqt4-dev: /usr/include/qt4/QtGui/QWidget
...
To copy to clipboard, switch view to plain text mode
I am guessing that some CMake command is pointing to the wrong include directory or something. (Or perhaps the code needs to use "QtGui/" as in #include <QtGui/QWidget> but I'd prefer to hack the CMakeLists.txt if possible.) Please tell me what correction I have to do to get *this* working now?
Bookmarks