From 57b928a1a5d98adc8c4ac0b1a241d87cbc7c43c3 Mon Sep 17 00:00:00 2001 From: Mason McParlane Date: Fri, 14 Aug 2020 17:20:45 -0400 Subject: 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 --- src/corelib/Qt5CoreMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/Qt5CoreMacros.cmake') diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake index c973799140..f5766f8775 100644 --- a/src/corelib/Qt5CoreMacros.cmake +++ b/src/corelib/Qt5CoreMacros.cmake @@ -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}") -- cgit v1.2.3