user3011146
user3011146

Reputation: 21

Attempting to compile with cmake

I'm attempting to compile a program with dependencies in Cmake and Qt (on Mountain Lion). The code

cmake build

returns

CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindQt4.cmake:1386 (message):
 Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:195 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!

The current Qt version is 5.1.1, which I have installed in ~/bin/ and I'm not sure how to get Cmake to find it.

Upvotes: 2

Views: 1527

Answers (1)

Tab
Tab

Reputation: 815

The error is saying this code requires Qt 4.x then for what are you wandering? it is due to line FIND_PACKAGE(Qt4 REQUIRED) though Cmake version should support Qt5 but may be your CmakeList is not proper written for that. Follow this document to correct your CmakeList.

Upvotes: 2

Related Questions