Как изменить параметр qtconfig в ‘cmake’ на qtconfig4?

При настройке Крита я получаю cmake ошибка говоря Unable to compile a basic Qt application. Qt has not been found correctly. Я думаю, причина в том, что существует конфликт между пакетами разработчиков QT5 и QT4. Что делать?

sricharan@sricharan-Lenovo-Z580:~/kde4/build$ sudo cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst $HOME/kde4/src/calligra -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRODUCTSET=KRITA
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Calligra version: 2.9 Pre-Alpha
-- Release build: TRUE
-- -------------------------------------------------------------------
-- Configured with product set "KRITA"-- -------------------------------------------------------------------
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt-Version 5.2.1 (using /usr/bin/qmake)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl (found version "5.18.2")
-- Found Phonon: /usr/include (Required is at least version "4.3.80")
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /home/sricharan/kde4/build/CMakeFiles/CMakeTmp

CMake Error: Internal CMake error, TryCompile configure of cmake failed

CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1311 (message):
Unable to compile a basic Qt application.  Qt has not been found correctly.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:146 (find_package)-- Configuring incomplete, errors occurred!

Я не уверен, но, возможно, причина в том, что это QT5, но KDE4 требует QT4. Я установил обязательно libqt4 библиотеки, но это не поможет. Что я должен делать?

Пожалуйста, скажите мне, если я ошибаюсь в своих ошибках.

0

Решение

Вы можете использовать переменную QT_SELECT env. (apt-get установить qtchooser)

пример

export QT_SELECT=4

или же

export QT_SELECT=qt4
0

Другие решения

export QT_SELECT=4 а также export QT_SELECT=qt кажется, больше не работает в cmake 2.8.12.2, переменные должны быть cmake переменные, т.е. запустить

cmake . -DQT_QT_INCLUDE_DIR=/usr/include/qt4/ -DQT_SELECT=4
make

Скомпилировать

0

По вопросам рекламы [email protected]