Changeset View
Changeset View
Standalone View
Standalone View
head/devel/cmake/files/patch-Modules_FindQt4.cmake
--- Modules/FindQt4.cmake.orig 2017-05-31 14:00:09 UTC | --- Modules/FindQt4.cmake.orig 2018-03-28 11:16:49 UTC | ||||
+++ Modules/FindQt4.cmake | +++ Modules/FindQt4.cmake | ||||
@@ -706,14 +706,7 @@ if (QT_QMAKE_EXECUTABLE AND | @@ -713,10 +713,15 @@ if (QT_QMAKE_EXECUTABLE AND | ||||
# ask qmake for the plugins directory | foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH}) | ||||
if (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED) | set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/plugins") | ||||
_qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir) | endforeach() | ||||
- set(QT_PLUGINS_DIR NOTFOUND) | |||||
- foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH}) | |||||
- set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/plugins") | |||||
- endforeach() | |||||
- find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer | - find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer | ||||
- HINTS ${qt_cross_paths} ${qt_plugins_dir} | + find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs | ||||
- DOC "The location of the Qt plugins" | HINTS ${qt_cross_paths} ${qt_plugins_dir} | ||||
DOC "The location of the Qt plugins" | |||||
- NO_CMAKE_FIND_ROOT_PATH) | - NO_CMAKE_FIND_ROOT_PATH) | ||||
+ set(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE) | + NO_CMAKE_FIND_ROOT_PATH | ||||
+ NO_SYSTEM_ENVIRONMENT_PATH | |||||
+ NO_CMAKE_SYSTEM_PATH) | |||||
+ if(NOT QT_PLUGINS_DIR AND qt_plugins_dir) | |||||
+ set(QT_PLUGINS_DIR ${qt_plugins_dir}) | |||||
+ endif() | |||||
endif () | endif () | ||||
# ask qmake for the translations directory | # ask qmake for the translations directory | ||||
@@ -726,16 +719,7 @@ if (QT_QMAKE_EXECUTABLE AND | @@ -740,6 +745,9 @@ if (QT_QMAKE_EXECUTABLE AND | ||||
if (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) | NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH | ||||
_qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir) | NO_CMAKE_SYSTEM_PATH) | ||||
if(qt_imports_dir) | |||||
- set(QT_IMPORTS_DIR NOTFOUND) | |||||
- foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH}) | |||||
- set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports") | |||||
- endforeach() | |||||
- find_path(QT_IMPORTS_DIR NAMES Qt | |||||
- HINTS ${qt_cross_paths} ${qt_imports_dir} | |||||
- DOC "The location of the Qt imports" | |||||
- NO_CMAKE_FIND_ROOT_PATH | |||||
- NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH | |||||
- NO_CMAKE_SYSTEM_PATH) | |||||
+ set(QT_IMPORTS_DIR ${qt_imports_dir} CACHE PATH "The location of the Qt imports" FORCE) | |||||
mark_as_advanced(QT_IMPORTS_DIR) | mark_as_advanced(QT_IMPORTS_DIR) | ||||
+ if(NOT QT_IMPORTS_DIR AND qt_imports_dir) | |||||
+ set(QT_IMPORTS_DIR ${qt_imports_dir}) | |||||
+ endif() | |||||
endif() | endif() | ||||
endif () | endif () | ||||