cmake: Quote the arguments to CMD's 'set' command

This avoids issues with some special characters and spaces.

Change-Id: I6b7cedbe2c9663f62fae104488454faebab52ce0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Mårten Nordheim 2020-05-29 11:34:23 +02:00
parent b39f33e311
commit bf03396ad8

View File

@ -247,7 +247,7 @@ function(qt_setup_tool_path_command)
set(bindir "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_BINDIR}")
file(TO_NATIVE_PATH "${bindir}" bindir)
list(APPEND command COMMAND)
list(APPEND command set PATH=${bindir}$<SEMICOLON>%PATH%)
list(APPEND command set \"PATH=${bindir}$<SEMICOLON>%PATH%\")
set(QT_TOOL_PATH_SETUP_COMMAND "${command}" CACHE INTERNAL "internal command prefix for tool invocations" FORCE)
endfunction()
qt_setup_tool_path_command()