FindQt4: define QT_IMPORTS_DIR variable even if it is not present on the system.
authorJonathan Riddell <jriddell@ubuntu.com>
Wed, 18 Jan 2012 16:00:49 +0000 (16:00 +0000)
committerFelix Geyer <fgeyer@debian.org>
Sun, 15 Jan 2017 15:00:24 +0000 (15:00 +0000)
Bug: http://public.kitware.com/Bug/view.php?id=14155
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/894805
Forwarded: yes
Origin: vendor

This happens when there are no plugins currently installed.

Gbp-Pq: Name qt_import_dir_variable.diff

Modules/FindQt4.cmake

index b0c49e564407febda0d9afcaa4b06e9810a84d8f..425d6e5d50f8a1434244bdf96824b6886a980c0a 100644 (file)
@@ -726,7 +726,7 @@ if (QT_QMAKE_EXECUTABLE AND
   if (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
     _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
     if(qt_imports_dir)
-      set(QT_IMPORTS_DIR NOTFOUND)
+      set(QT_IMPORTS_DIR "${qt_imports_dir}")
       foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
         set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports")
       endforeach()