Replace WIN32 with CMAKE_HOST_WIN32
The qt5_make_output_file routine joins paths together improperly on Windows when cross-compiling to a Unix target (Android). This change ensures the paths are set properly based on host machine instead of target. Fixes: QTBUG-86037 Pick-to: 5.15 Change-Id: I411b4f80296e989cd4fdf19799b731131defb2ca Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
4bf8e82d41
commit
57b928a1a5
@ -63,7 +63,7 @@ macro(qt5_make_output_file infile prefix ext outfile )
|
||||
else()
|
||||
file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
endif()
|
||||
if(WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path
|
||||
if(CMAKE_HOST_WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path
|
||||
set(rel "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user