Compilando código que depende do QT4 com o QT5 instalado

3

Eu tenho QT5 instalado no 12.10 Eu acredito, porque é uma dependência para o Ubuntu SDK e as ferramentas de toque do Ubuntu que eu tenho usado. Eu tenho o QT4 instalado também, de fato eu o instalei primeiro.

Agora preciso compilar algum código para o trabalho que usa as bibliotecas QT4, mas o cmake está reclamando

-- Found unsuitable Qt version "5.0.2" from /usr/bin/qmake

Embora eu esteja usando

# find and set up qt
find_package (Qt4)

No arquivo CMAKE

Então eu preciso encontrar uma maneira de fazer o CMake encontrar o Qt4, que eu tentei e não consegui descobrir. Além disso, não é o meu código, então eu não quero ter um arquivo personalizado do Cmake apenas para mim.

Como estou com pouco tempo, pensei em remover o QT5 por enquanto e reinstalá-lo mais tarde. Mas quando tento removê-lo, recebo o seguinte. Eu não quero remover todos os outros pacotes que ele diz (abaixo).

Qualquer conselho sobre compilar com o QT4 ou se livrar do QT5 seria apreciado.

The following packages will be REMOVED
account-plugin-aim account-plugin-facebook account-plugin-flickr account-plugin-google account-plugin-identica account-plugin-jabber account-plugin-salut account-plugin-twitter account-plugin-windows-live  account-plugin-yahoo appmenu-qt checkbox-qt cordova-ubuntu-2.8 cordova-ubuntu-2.8-dev cordova-ubuntu-2.8-examples empathy everpad gnome-control-center-signon gwibber-service-facebook gwibber-service-identica  gwibber-service-twitter katepart kde-runtime kdelibs-bin kdelibs5-plugins kdoctools kile konsole kubuntu-debug-installer libaccount-plugin-1.0-0 libaccounts-qt1 libattica0.4 libdbusmenu-qt2 libkactivities-bin  libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkidletime4 libkio5  libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5abi1 libkparts4 ibkprintutils4 libkpty4 libkrosscore4 libktexteditor4 libkxmlrpcclient4 libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomuksync4 libnepomukutils4 libntrack-qt4-1 libokularcore1abi1 libphonon4 libplasma3 libpolkit-qt-1-1 libpoppler-qt4-4 libpyside1.1 libqapt-runtime libqapt1 libqca2  libqgis1.7.5 libqgsttools-p1 libqimageblitz4 libqjson0 libqt4-core libqt4-dbus libqt4-declarative libqt4-declarative-gestures libqt4-declarative-particles libqt4-designer libqt4-dev libqt4-dev-bin libqt4-gui  libqt4-help libqt4-network libqt4-opengl libqt4-opengl-dev libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqt53d5  libqt5clucene5 libqt5concurrent5 libqt5contacts5 libqt5core5 libqt5dbus5 libqt5declarative5 libqt5designer5 libqt5designercomponents5 libqt5feedback5 libqt5gui5 libqt5help5 libqt5location5  libqt5location5-plugins libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediaquick-p5 libqt5multimediawidgets5 ibqt5network5 libqt5opengl5 libqt5opengl5-dev libqt5organizer5 libqt5printsupport5  libqt5qml-graphicaleffects libqt5qml5 libqt5quick5 libqt5quickparticles5 libqt5quicktest5 libqt5script5 libqt5scripttools5 libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5svg5-dev  libqt5systeminfo5 libqt5test5 libqt5v8-5 libqt5v8-5-dev libqt5versit5 libqt5webkit5 libqt5webkit5-dev libqt5webkit5-qmlwebkitplugin libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 libqt5xmlpatterns5-dev  libqtassistantclient4 libqtcore4 libqtgui4 libqtwebkit-dev libqtwebkit4 libqwt5-qt4 libsignon-extension1 libsignon-glib1 libsignon-plugins-common1 libsignon-qt1 libsolid4 libsoprano4 libthreadweaver4  libunity-action-qt1 mcp-account-manager-uoa nautilus-sendto-empathy nepomuk-core okular phonon phonon-backend-gstreamer plasma-scriptengine-javascript pymi pyqt4-dev-tools python-pyside.qtcore  python-pyside.qtgui python-pyside.qtnetwork python-pyside.qtwebkit python-qgis python-qt4 python-qt4-dbus qapt-batch qdbus qgis qgis-plugin-grass qgis-providers qmlscene qt-at-spi qt3d5-dev qt4-demos  qt4-designer qt4-linguist-tools qt5-default qtbase5-dev qtcreator qtcreator-plugin-ubuntu qtcreator-plugin-ubuntu-cordova qtdeclarative5-cordova-2.8-plugin qtdeclarative5-dev qtdeclarative5-dev-toolsqtdeclarative5-folder listmodel-plugin qtdeclarative5-localstorage-pluginqtdeclarative5-particles-plugin qtdeclarative5-qtaudioengine-plugin qtdeclarative5-qtfeedback-plugin qtdeclarative5-qtmultimedia-plugin  qtdeclarative5-qtquick2-plugin qtdeclarative5-qtsensors-plugin qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-unity-action-plugin qtdeclarative5-window-plugin qtdeclarative5-xmllistmodel-plugin qtlocation5-dev qtmultimedia5-dev qtscript5-dev qtsensors5-dev qttools5-dev qttools5-dev-tools shotwell signon-keyring-extension signon-plugin-oauth2 signon-plugin-password signon-ui signond sni-qt  soprano-daemon spotify-client ubuntu-desktop ubuntu-sdk ubuntu-sso-client-qt ubuntu-ui-toolkit-examples ubuntuone-control-panel-qt unity-scope-gdocs virtualbox-4.2
    
por Caustic 24.09.2013 / 12:41

1 resposta

6

A solução foi adicionar o seguinte ao meu CMakeLists.txt

set(QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4)

Em seguida, compilou bem

    
por Caustic 24.09.2013 / 13:26