Reputation: 4634
I have the following in my CMakeLists.txt
find_package(Qt4 4.8.6 REQUIRED COMPONENTS Core)
target_link_libraries(debug Qt4::Core)
And I am getting the following error
Could NOT find Qt4 (missing: QT_CORE_INCLUDE_DIR QT_CORE_LIBRARY) (found
suitable version "4.8.6", minimum required is "4.8.6")
I ran dpkg -l | grep qt
and I have libqt4-dev and which qmake
returns /usr/bin/qmake
.
Any ideas? I'm on Ubuntu if that helps.
Upvotes: 0
Views: 1102
Reputation: 66118
Proper name for Qt4 "Core" component is QtCore
. See e.g. this question as usage example.
The error message means that CMake has found QT4 partially: it has found basic libraries and include directories, but it has been unable to find things about "Core" component you ask. Note on CORE
substring in missing variables' names.
Upvotes: 2