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

How specify Qt version/location?

Tags: None
(comma "," separated)
youone
Registered Member
Posts
2
Karma
0

How specify Qt version/location?

Fri Aug 08, 2014 4:24 pm
Hi,

I am following the instructions on http://marble.kde.org/sources.php. When doing cmake I get the message below. How do I tell cmake which Qt version I want to use and where it is located? I have built and installed Qt 4.8.6 from sources. It compiled just fine and is working. It installed by default in /usr/local/Trolltech/Qt-4.8.6/. System is openSUSE 13.1.

CMake Error at CMakeLists.txt:66 (find_package):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Core" with any
of the following names:
Qt5CoreConfig.cmake
qt5core-config.cmake
Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
"Qt5Core_DIR" to a directory containing one of the above files. If
"Qt5Core" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
cmake should use the Qt version where the qmake executable found in $PATH belongs to. Check
Code: Select all
qmake -v
and
Code: Select all
which qmake
and the settings of the environment variable $PATH.
youone
Registered Member
Posts
2
Karma
0
Ok, many thanks Earthwings. I just had to set the path and it worked.
maninvan
Registered Member
Posts
3
Karma
0
Just in case this helps anybody, I have built Qt5 version on OSX using. NOTE: I used Qt5.2.1 but you may need to changes that to your version.

Code: Select all
cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=FALSE -DCMAKE_INSTALL_PREFIX=~/marble/export ~/marble/sources -DCMAKE_PREFIX_PATH=~/Qt5.2.1/5.2.1/clang_64/lib/cmake/
xitao
Registered Member
Posts
4
Karma
0
OS
thanks,maninvan!

I use ubuntu14.04 64bit and Qt5.3.1
and follow this
Code: Select all
cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=~/marble/export ~/marble/sources -DCMAKE_PREFIX_PATH=/opt/Qt/5.3/gcc_64/lib/cmake

it works!


Bookmarks



Who is online

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