Opened 9 years ago

Closed 7 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@…

Description

Hi,

Please see http://bugs.debian.org/634522 for some context. This is due to broken cmake Qt4 detection: the OPTIONAL parameter isn't allowed by cmake.

Patch attached.

Thanks,

_g.

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by pini

comment:1 Changed 9 years ago by rikky

Hi,

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 7 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 worked with Qt because it used 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.

Last edited 7 years ago by sleske (previous) (diff)

comment:3 Changed 7 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.