Qt5 with KDevelop

Sergey Vidyuk sir.vestnik at gmail.com
Wed Mar 27 16:49:30 GMT 2013


В письме от 22 марта 2013 12:10:13 пользователь Freddy Martinez Garcia 
написал:
> Hi peopple
> 
> I'm traying to use Qt5 with KDevelop but I can't because KDevelop tell
> me that he dosen't find the Qt5 directory and I have installed Qt5
> libraries.
> 
> I'm using Archlinux and I know that /user/bin/qmake is for Qt5 and in my
> configuration I have /usr/bin/qmake-qt4. If I change this, I have the
> following error:
> 
> /home/freddy/projects/qt5-2/build> make
> CMake Error at CMakeLists.txt:3 (find_package):
>   By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project
> has
>   asked CMake to find a package configuration file provided by "Qt5",
> but
>   CMake did not find one.
> 
>   Could not find a package configuration file provided by "Qt5" with any
> of
>   the following names:
> 
>     Qt5Config.cmake
>     qt5-config.cmake
> 
>   Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set
> "Qt5_DIR"
>   to a directory containing one of the above files.  If "Qt5" provides a
>   separate development package or SDK, be sure it has been installed.
> 
> 
> -- Configuring incomplete, errors occurred!
> make: *** [cmake_check_build_system] Error 1
> *** Failed ***
> 
> 
> 
> my CMakeLists.txt file is:
> project(qt5-2)
> cmake_minimum_required(VERSION 2.6)
> find_package(Qt5 REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
> 
> include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
> 
> set(qt5-2_SRCS qt5-2.cpp main.cpp)
> qt4_automoc(${qt5-2_SRCS})
> add_executable(qt5-2 ${qt5-2_SRCS})
> target_link_libraries(qt5-2 ${QT_QTCORE_LIBRARY})
> 
> install(TARGETS qt5-2 RUNTIME DESTINATION bin)
> 
> 
> and my project configuration is attached to this email.. help me
> please...
> 
> best regards
> 
> freddy

Refer to the official docs on Qt5 with cmake:
http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html
And it's really good idea to read find_package cmake command documentation:
http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package

It's not kdevelop question. It's cmake question.

--
Sergey Vidyuk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20130327/6ed98ca9/attachment.sig>


More information about the KDevelop mailing list