From 6444d36e5dca5eaf737000d357307138456cdb8e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 17 Oct 2012 16:04:03 +0200 Subject: [PATCH] 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 --- mkspecs/cmake/Qt5ConfigVersion.cmake.in | 2 +- mkspecs/features/create_cmake.prf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/cmake/Qt5ConfigVersion.cmake.in b/mkspecs/cmake/Qt5ConfigVersion.cmake.in index 96ea9c000d..e804754912 100644 --- a/mkspecs/cmake/Qt5ConfigVersion.cmake.in +++ b/mkspecs/cmake/Qt5ConfigVersion.cmake.in @@ -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) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index b168dad9f2..29d256db7f 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -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