summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-06-07 13:22:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-10 23:29:40 +0200
commite1109df7a92812233935489bc9fbae524536130a (patch)
tree0764fbf2b8654a495b2fe3c6f15267e20c7255c5
parentd7b79ff3ef714ca0c433763a0563a069575271cb (diff)
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>
-rw-r--r--mkspecs/features/cmake_functions.prf2
-rw-r--r--src/corelib/Qt5CTestMacros.cmake4
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in12
3 files changed, 8 insertions, 10 deletions
diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf
index f48ef43b88..a67fd9af9b 100644
--- a/mkspecs/features/cmake_functions.prf
+++ b/mkspecs/features/cmake_functions.prf
@@ -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, ";"))
}
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()