summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt5CTestMacros.cmake4
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in12
2 files changed, 7 insertions, 9 deletions
diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake
index 51537a3904..126a348b47 100644
--- a/src/corelib/Qt5CTestMacros.cmake
+++ b/src/corelib/Qt5CTestMacros.cmake
@@ -38,10 +38,6 @@ foreach(module ${CMAKE_MODULES_UNDER_TEST})
)
endforeach()
-if(CMAKE_CROSSCOMPILING AND CMAKE_FIND_ROOT_PATH)
- list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_LINK_FLAGS=--sysroot=\"${CMAKE_FIND_ROOT_PATH}\"")
-endif()
-
macro(expect_pass _dir)
string(REPLACE "(" "_" testname "${_dir}")
string(REPLACE ")" "_" testname "${testname}")
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 4a6f6250f5..83e77280d5 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -57,7 +57,7 @@ find_path(_qt5gui_OPENGL_INCLUDE_DIR $$CMAKE_GL_HEADER_NAME
PATHS $$CMAKE_GL_INCDIRS
NO_DEFAULT_PATH)
if (NOT _qt5gui_OPENGL_INCLUDE_DIR)
- message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"$$CMAKE_GL_INCDIRS\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
+ message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"$$CMAKE_GL_INCDIRS\\\".\")
endif()
_qt5_Gui_check_file_exists(${_qt5gui_OPENGL_INCLUDE_DIR})
@@ -87,7 +87,7 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
if (\"${ARGN}\" STREQUAL \"OPTIONAL\")
break()
else()
- message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
+ message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\".\")
endif()
endif()
add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED)
@@ -116,9 +116,11 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
endif()
list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name})
endforeach()
- foreach(_dir ${IncDirs})
- _qt5_Gui_check_file_exists(${_dir})
- endforeach()
+ if (NOT CMAKE_CROSSCOMPILING)
+ foreach(_dir ${IncDirs})
+ _qt5_Gui_check_file_exists(${_dir})
+ endforeach()
+ endif()
endmacro()