Opened 10 years ago

Closed 9 years ago

#903 closed defect/bug (fixed)

[cmake] Broken Qt4 detection

Reported by: pini Owned by: KaZeR
Priority: major Milestone:
Component: core Version: git master
Severity: Keywords:
Cc: pini@…



Please see for some context. This is due to broken cmake Qt4 detection: the OPTIONAL parameter isn't allowed by cmake.

Patch attached.



Attachments (1)

qt-cmake.patch (930 bytes) - added by pini 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by pini

comment:1 Changed 10 years ago by rikky


I don't know why the "OPTIONAL" parameter is not recognized by your cmake version (works here with 2.8.4 and 2.8.5), but omitting this parameter should work too. Do you see any drawback by just omitting "OPTIONAL"? Your patch would require more qt modules to be installed than necessary for building qt_painter.

Regards, rikky

comment:2 Changed 9 years ago by sleske

I don't know why the "OPTIONAL" parameter is not recognized by your cmake version (works here with 2.8.4 and 2.8.5)

This seems to be a misunderstanding. The cmake command "find_package" does not have a documented parameter "OPTIONAL", and using "OPTIONAL" really does not work (I tested with CMake 2.8.5 and 2.8.9).

At any rate, the CMake build only works with Qt because it uses modified copies of the standard CMake scripts for Qt4 (see navit/cmake/*Qt4*). Unlike the regular scripts in the CMake distribution, these do not check if any of the listed components are actually installed. So if some components are missing, Qt4 support is still enabled, then CMake detects the missing components and aborts the build :-(.

Since they are apparently buggy, and copy&pasted, I removed the navit/cmake/*Qt4* scripts. The build now uses the standard CMake mechanisms, which also works, and is more maintainable. See rev. 5251.

Version 0, edited 9 years ago by sleske (next)

comment:3 Changed 9 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

As the CMake build for Qt4 should now work, I'm closing this bug.

I'll also file a Debian bug that the patch in the Debian package can be dropped.

Note: See TracTickets for help on using tickets.