CMake: Fix quoting issue with quoted paths in strings.

Create a local CMake variable instead and use that in the search
paths argument and in the message string.

Resolves a warning that can appear with CMake 2.8.12.

Task-number: QTBUG-34115
Change-Id: I04c67668586a9ad6584b7f6e91ee65351c86389c
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Stephen Kelly 2013-10-25 13:26:00 +02:00 committed by The Qt Project
parent b01ec07a06
commit 054f357b69
1 changed files with 4 additions and 2 deletions

View File

@ -54,12 +54,14 @@ set(Qt5Gui_OPENGL_LIBRARIES Qt5::Gui_GLESv2)
!!IF !isEmpty(CMAKE_GL_INCDIRS)
set(_GL_INCDIRS $$CMAKE_GL_INCDIRS)
find_path(_qt5gui_OPENGL_INCLUDE_DIR $$CMAKE_GL_HEADER_NAME
PATHS $$CMAKE_GL_INCDIRS
PATHS ${_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\\\".\")
message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"${_GL_INCDIRS}\\\".\")
endif()
unset(_GL_INCDIRS)
_qt5_Gui_check_file_exists(${_qt5gui_OPENGL_INCLUDE_DIR})