[CMake] How to make cmake-2.6 tell why it fails

Martin Costabel costabel at wanadoo.fr
Tue Aug 19 14:27:35 EDT 2008


I am trying to help a user whose effort to build scribus-1.3.3.12 with 
cmake-2.6.0 on MacOSX-10.4.11 always fail with the message

CMake Error at CMakeLists.txt:234 (MESSAGE):
   No Qt3

With the exact same configuration(?), the build runs OK for me, and I am 
looking for clues on how to debug this.

Unfortunately, I haven't yet succeeded to have cmake give any 
information on why it thinks it does not find Qt3 on the user's system. 
The CMakeOutput.log and CMakeError.log files do not contain anything 
Qt3-related; they stop just before the FindQt3 module is invoked. And 
using the --debug-output flag does not help either; it adds absolutely 
nothing to the output at this point.

Is it possible to order cmake to confess what it is doing and what files 
it is looking for? Note that I don't need advice on how to install Qt3 
nor how to install or use cmake. I am only looking for an efficient 
debug flag, something similar to "make -d", or equivalent to reading the 
source of a configure script.

The corresponding part of the CMakeLists.txt from scribus is the following:

SET (QT_MT_REQUIRED true)
SET (QT_MIN_VERSION "3.3.4")
FIND_PACKAGE(Qt3 REQUIRED)
IF (QT_FOUND)
   MESSAGE("Qt3 Found OK (${qt_version_str})")
ELSE(QT_FOUND)
   MESSAGE(FATAL_ERROR "No Qt3")
ENDIF(QT_FOUND)

The QTDIR environment variable is set to the correct directory in which 
a valid qt3-3.3.8 installation is present.

Any help appreciated.

-- 
Martin








More information about the CMake mailing list