diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 33 | ||||
-rw-r--r-- | Modules/GNUInstallDirs.cmake | 2 |
2 files changed, 21 insertions, 14 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 28b8454..46a893d 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -761,7 +761,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) set(QT_MKSPECS_DIR NOTFOUND) find_path(QT_MKSPECS_DIR NAMES qconfig.pri HINTS ${qt_cross_paths} ${qt_mkspecs_dirs} - DOC "The location of the Qt mkspecs containing qconfig.pri") + DOC "The location of the Qt mkspecs containing qconfig.pri" + NO_CMAKE_FIND_ROOT_PATH) endif() if(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") @@ -917,7 +918,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) endforeach() find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer HINTS ${qt_cross_paths} ${qt_plugins_dir} - DOC "The location of the Qt plugins") + DOC "The location of the Qt plugins" + NO_CMAKE_FIND_ROOT_PATH) endif () # ask qmake for the translations directory @@ -937,6 +939,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) 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) mark_as_advanced(QT_IMPORTS_DIR) @@ -1178,20 +1181,24 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) endmacro() macro(_qt4_add_target_depends _QT_MODULE) - get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) - _qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN}) - foreach(_config ${_configs}) - _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN}) - endforeach() - set(_configs) + if (TARGET Qt4::${_QT_MODULE}) + get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) + _qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN}) + foreach(_config ${_configs}) + _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN}) + endforeach() + set(_configs) + endif() endmacro() macro(_qt4_add_target_private_depends _QT_MODULE) - get_target_property(_configs ${_QT_MODULE} IMPORTED_CONFIGURATIONS) - foreach(_config ${_configs}) - _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN}) - endforeach() - set(_configs) + if (TARGET Qt4::${_QT_MODULE}) + get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS) + foreach(_config ${_configs}) + _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN}) + endforeach() + set(_configs) + endif() endmacro() diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index c8d77c6..9f5b8a4 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -95,7 +95,7 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR) # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu" # See http://wiki.debian.org/Multiarch - if(CMAKE_SYSTEM_NAME MATCHES "Linux" + if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" AND NOT CMAKE_CROSSCOMPILING) if (EXISTS "/etc/debian_version") # is this a debian system ? if(CMAKE_LIBRARY_ARCHITECTURE) |