This forum has been archived. All content is frozen. Please use KDE Discuss instead.

cmake, qt, kde, ubuntu 14.04

Tags: cmake, qt, kde, kdevelop, ubuntu, trusty tahr, qt_qt_include_dir cmake, qt, kde, kdevelop, ubuntu, trusty tahr, qt_qt_include_dir cmake, qt, kde, kdevelop, ubuntu, trusty tahr, qt_qt_include_dir
(comma "," separated)
slahl
Registered Member
Posts
2
Karma
0

cmake, qt, kde, ubuntu 14.04

Fri Sep 19, 2014 3:15 pm
Hi,

short story:

https://techbase.kde.org/Development/Tu ... st_program


Code: Select all
stephan@druschba:~/Src/KDE-Test$ vi main.cpp
stephan@druschba:~/Src/KDE-Test$ vi CMakeLists.txt
stephan@druschba:~/Src/KDE-Test$ cmake .
-- 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
-- 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/stephan/Src/KDE-Test/CMakeFiles/CMakeTmp

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

CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1316 (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:2 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/stephan/Src/KDE-Test/CMakeFiles/CMakeOutput.log".
See also "/home/stephan/Src/KDE-Test/CMakeFiles/CMakeError.log".
stephan@druschba:~/Src/KDE-Test$


The chapter about kdevelop and templates is for tomorrow. :)
I've already found out that this kind of fun isn't entirely new. However, I couldn't find a solution that works here.

Any ideas anybody? :)
slahl
Registered Member
Posts
2
Karma
0

Re: cmake, qt, kde, ubuntu 14.04

Wed Sep 24, 2014 5:27 am
Nobody? Seriously? :)
There's this other thread where something with kdevelop's handling of environment variables went wrong. That happens here too. But it's not why cmake won't find any qt includes. I'll probably go with manually written Makefile or qmake. But I don't think this is a cmake bug (and I didn't find one filed.). It must be some PEBKAC that I don't see.

yelp! :)
wolfi323
Registered Member
Posts
1129
Karma
11
OS

Re: cmake, qt, kde, ubuntu 14.04

Wed Sep 24, 2014 8:22 am
Well, at far as I can see, it finds Qt5. But you are trying to compile a KDE4 application which needs Qt4.

So, do you have the necessary qt4 devel packages installed?
Probably there is a conflict, so maybe try to remove the Qt5 ones as well.

I have no experience with Ubuntu though, sorry. You might want to ask in a distribution-specific forum.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake, qt, kde, ubuntu 14.04

Tue Nov 04, 2014 4:11 am
Unfortunately the forum isn't too great with development questions i'm afraid. Most developers still tend to prefer mailing lists.
In terms of your problem here - you need to install the appropriate Qt 4 development package (libqt4-dev I think) to continue.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]