Bug 288993 - FindQt4.cmake shipped with kdelibs set req_qt_major_vers to a null string
Summary: FindQt4.cmake shipped with kdelibs set req_qt_major_vers to a null string
Status: CONFIRMED
Alias: None
Product: buildsystem
Classification: Developer tools
Component: KDE4 (cmake) (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Neundorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 19:09 UTC by LuRan
Modified: 2021-03-09 05:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LuRan 2011-12-14 19:09:41 UTC
Version:           unspecified (using Devel) 
OS:                Linux

This is related to http://public.kitware.com/Bug/view.php?id=12352, it seems then specify QT_MIN_VERSION without setting the corresponding version in find_package, only Qt4_FIND_VERSION is set by cmake, while Qt4_FIND_VERSION_MAJOR/_MINOR/_PATCH are null(at least this is true with cmake 2.8.5). Then req_qt_major_vers and friends are set to null before FindQt4 check the version number, causing error messages like this:

CMake Error at /usr/local/kde4/share/apps/cmake/modules/FindQt4.cmake:517 (MESSAGE):
  Invalid Qt version string given: "4.5.0", major version 4 is required, e.g.
  "4.0.1"

The problem manifest itself when the program try to have optional kde support, e.g. try to find Qt first then find KDE, if the program only check qt or check kde the bug does not affect them.

Reproducible: Didn't try

Steps to Reproduce:
Run cmake with the following CMakeLists.txt:

cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
set(QT_MIN_VERSION "4.5.0")
find_package(Qt4 REQUIRED)
find_package(KDE4)

Actual Results:  
Get error message:
CMake Error at /usr/local/kde4/share/apps/cmake/modules/FindQt4.cmake:517 (MESSAGE):
  Invalid Qt version string given: "4.5.0", major version 4 is required, e.g.
  "4.0.1"

Expected Results:  
CMake finishes without an error.
Comment 1 Justin Zobel 2021-03-09 05:27:04 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.