Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot cmake kde-connect

I am trying to install kde-connect following this. Although my kubuntu version is 14.04, I wanted to compile them so that I can have the latest version. But when I followed the instructions to compile, i get the following error.

-- Found Qt-Version 5.2.1 (using /usr/bin/qmake)
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/vinaychandra/Downloads/t/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:7 (find_package)

Please point out how to correct this.

I have tried giving -DQT_QT_INCLUDE_DIR=/usr/share/qt4/ then it tells that You must build your code with position independent code if Qt was built with -reduce-relocations.

like image 212
Vinay Chandra Avatar asked Oct 09 '14 19:10

Vinay Chandra


People also ask

How do I enable KDE connection?

First, you will need to install KDE Connect on our system. You can find KDE Connect as a package in the official repository of your Linux system. In Ubuntu, this app is supported by its official repository, so you can install KDE Connect by using the apt command.

How do I send SMS using KDE Connect?

Instead, on Unity, Cinnamon, Budgie and related desktops, you need to select the “Send SMS” feature from the KDE Connect indicator menu, manually enter a phone number, and then enter your message.

What protocol does KDE Connect use?

KDE Connect uses Transport Layer Security (TLS) encryption protocol for communication. It uses SFTP to mount devices and to send files.


2 Answers

Your cmake by default uses a different QT version. So, you must explicitly tell him which version of QT he have to use for this job.

This one

-DQT_QT_INCLUDE_DIR=/usr/share/qt4/

Is wrong because you mustn't give QT position explicitly. All you need is to use the right qmake. So, give'em this flag and you'll be happy!

-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
like image 81
Zhigalin - Reinstate CMs Avatar answered Oct 12 '22 23:10

Zhigalin - Reinstate CMs


Since most of kde applications are not ported to Qt5, you need Qt4.x for building kdeconnect(don't know x, mine is 4.8.6). Also Qt4 installer is not available (I think !), so you have to build it also from source. Building Qt4 is quite easy, just download the source and run the usual commands.

After building it, it qmake name will be qmake-qt4 in /usr/bin. So for building kdeconnect, first run its cmake, then a Cmaketextcache.txt file will form. In that change the path of qmake (i.e somewhere written /usr/bin/qmake to /usr/bin/qmake-qt4) and also the path of qt include dir to (I think /usr/include/qt5 to /usr/include/qt4), and run the cmake again.

If some packages are missing, then you have to install it. But with the above changes, you will get a make file to install it.

like image 33
vineetgarg Avatar answered Oct 13 '22 00:10

vineetgarg