Qt-interest Archive, July 2007
Using custom Qt 4.x with CMake
Message 1 in thread
Does anyone know how I get cmake to use my custom Qt 4.3.0, instead of the
system wide installed Qt 4.2.1? I have set QTDIR and PATH contains the
4.3.0 path in front, but cmake still wants to use 4.2.1.
Arne
--
[ signature omitted ]
Message 2 in thread
On 14.07.07 12:18:10, Arne Schmitz wrote:
> Does anyone know how I get cmake to use my custom Qt 4.3.0, instead of the
> system wide installed Qt 4.2.1? I have set QTDIR and PATH contains the
> 4.3.0 path in front, but cmake still wants to use 4.2.1.
Thats more of a cmake than Qt question ;)
Anyway, make sure you clear your builddir so FindQt4 really looks for
the Qt and doesn't use the values from the CMakeCache.txt.
Also QTDIR is not needed, only qmake has to be in PATH before other
qmake's (check qmake --version).
Works here without any problems.
Andreas
--
[ signature omitted ]
Message 3 in thread
Andreas Pakulat wrote:
> Anyway, make sure you clear your builddir so FindQt4 really looks for
> the Qt and doesn't use the values from the CMakeCache.txt.
>
> Also QTDIR is not needed, only qmake has to be in PATH before other
> qmake's (check qmake --version).
>
> Works here without any problems.
I tried that:
------------------------------
~/programs/build$ rm -rf *
~/programs/build$ cmake ../myproject/
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Found Qt-Version 4.2.1
[SNIP]
~/programs/build$ qmake --version
QMake version 2.01a
Using Qt version 4.3.0 in /home/myuser/bin/qt//lib
------------------------------
This does not seem to work. My compilation fails, since I need some
properties, which were introduced in Qt 4.3.
Also, I tried to get some answers over at the cmake folks, but no luck yet.
Arne
--
[ signature omitted ]
Message 4 in thread
Arne Schmitz wrote:
> This does not seem to work. My compilation fails, since I need some
> properties, which were introduced in Qt 4.3.
>
> Also, I tried to get some answers over at the cmake folks, but no luck yet.
Have a look at the FindQt4.cmake and Qt4Config.cmake files (I think
those are the names) to see how it's actually looking.
--
[ signature omitted ]
Message 5 in thread
By the way, you can use the CMake switch:
-DQT_QMAKE_EXECUTABLE=/usr/lib/qt4/bin/qmake
(well, with the correct path to your qmake) if you have more than one version
of Qt installed or FindQt4.cmake is having trouble finding your installation.
With Qt4, simply telling CMake where the qmake binary you want to use is
located will (generally) ensure the final binary is linked against the
correct libs.
Katrina Niolet
Le Sunday 15 July 2007 01:46:59 am Craig Ringer, vous avez écrit :
> Arne Schmitz wrote:
> > This does not seem to work. My compilation fails, since I need some
> > properties, which were introduced in Qt 4.3.
> >
> > Also, I tried to get some answers over at the cmake folks, but no luck
> > yet.
>
> Have a look at the FindQt4.cmake and Qt4Config.cmake files (I think
> those are the names) to see how it's actually looking.
>
> --
> Craig Ringer
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 6 in thread
Arne Schmitz wrote:
> Does anyone know how I get cmake to use my custom Qt 4.3.0, instead of the
> system wide installed Qt 4.2.1? I have set QTDIR and PATH contains the
> 4.3.0 path in front, but cmake still wants to use 4.2.1.
Ok, the problem was, that cmake (at least the Debian version) searches
for "qmake-qt4" first. That seems to be some Debian style thing, I guess.
So I just linked my custom qmake to qmake-qt4, and everything works now
fine!
Arne
--
[ signature omitted ]
Message 7 in thread
On 14.07.07 14:56:45, Arne Schmitz wrote:
> Arne Schmitz wrote:
>
> > Does anyone know how I get cmake to use my custom Qt 4.3.0, instead of the
> > system wide installed Qt 4.2.1? I have set QTDIR and PATH contains the
> > 4.3.0 path in front, but cmake still wants to use 4.2.1.
>
> Ok, the problem was, that cmake (at least the Debian version) searches
> for "qmake-qt4" first. That seems to be some Debian style thing, I guess.
> So I just linked my custom qmake to qmake-qt4, and everything works now
> fine!
Actually the FindQt4.cmake included with debians cmake is broken. It
first searches for qmake+qmake-qt4 and then later on again searches for
qmake-qt4 if "qmake" == "qmake-qt3". I'll file a bugreport.
BTW: It works for me because I'm using the KDE4-supplied FindQt4.cmake
:)
Andreas
--
[ signature omitted ]