Use a qmake variable to pass the Qt version to the cmake version file.

By depending on a simple variable instead of a more complex expression, we
can more easily use this file from other contexts.

Change-Id: Ib6ce1e2537f3e7ac19d25ad33454f25e85f71040
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Stephen Kelly 2012-10-17 16:04:03 +02:00 committed by The Qt Project
parent 1e68ec7e67
commit 6444d36e5d
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
set(PACKAGE_VERSION $$eval(QT.$${MODULE}.VERSION))
set(PACKAGE_VERSION $$CMAKE_PACKAGE_VERSION)
if(\"\${PACKAGE_VERSION}\" VERSION_LESS \"\${PACKAGE_FIND_VERSION}\")
set(PACKAGE_VERSION_COMPATIBLE FALSE)

View File

@ -156,6 +156,8 @@ INSTALLS += cmake_qt5_module_files
cmake_config_file.input = $$PWD/../cmake/Qt5BasicConfig.cmake.in
cmake_config_file.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
CMAKE_PACKAGE_VERSION = $$eval(QT.$${MODULE}.VERSION)
cmake_config_version_file.input = $$PWD/../cmake/Qt5ConfigVersion.cmake.in
cmake_config_version_file.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake