Remove the use of CMAKE_FIND_ROOT_PATH.
This is actually a list in CMake, not a value to be prepended to paths. Specify the QT_SYSROOT instead to root the location of include directories. CMake will soon get a CMAKE_SYSROOT variable which will replace this. Change-Id: I239f69f127f3676a3835aa4f29638f44ef209819 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
d7b79ff3ef
commit
e1109df7a9
@ -45,7 +45,7 @@ defineReplace(cmakePortablePaths) {
|
||||
variable = $$1
|
||||
out =
|
||||
for(v, variable) {
|
||||
out += ${CMAKE_FIND_ROOT_PATH}$$cmakeTargetPath($$v)
|
||||
out += $$[QT_SYSROOT]$$cmakeTargetPath($$v)
|
||||
}
|
||||
return ($$join(out, ";"))
|
||||
}
|
||||
|
@ -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}")
|
||||
|
@ -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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user