configure: Fix --foo=bar arguments

This amends commit c5409964b0.

When detecting a variable assignment, we must ignore arguments that
start with a dash.  Otherwise, arguments like --prefix=~/Qt are ignored.

Change-Id: I3b143113b94ca0d8af92679c1f567fbcec298349
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2021-11-10 15:56:35 +01:00
parent 2d7900e2b1
commit a3d8a359f1

View File

@ -564,7 +564,7 @@ while(1)
endif()
# Handle variable assignments
if(arg MATCHES "^([a-zA-Z0-9_-]+)=(.*)")
if(arg MATCHES "^([a-zA-Z0-9_][a-zA-Z0-9_-]*)=(.*)")
list(APPEND cmake_var_assignments "${arg}")
continue()
endif()