Topologically sort $${MODULE}.depends when generating cmake files.
authorStephen Kelly <stephen.kelly@kdab.com>
Fri, 7 Dec 2012 09:13:24 +0000 (10:13 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 7 Dec 2012 13:49:08 +0000 (14:49 +0100)
The contents of this eventually go into a CMake target
property IMPORTED_LINK_INTERFACE_LIBRARIES, which seems to expect
sorted input. Usually the contents is generated by CMake itself,
so generating content it expects is reasonable.

This fixes the qtactiveqt cmake unit test with MingW on linux.

Change-Id: I2a540bea5c3ac214ad4e1dfedfb7cbd2f863472b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
mkspecs/features/create_cmake.prf

index 9548c5e..3aec63a 100644 (file)
@@ -17,7 +17,7 @@ defineReplace(cmakeModuleList) {
 
 CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
 
-CMAKE_MODULE_DEPS = $$cmakeModuleList($$eval(QT.$${MODULE}.depends))
+CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.))
 CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
 !isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}"