Skip to content

Commit 9ae81da

Browse files
committed
ICU: explicitly suffix tools for cross-compiling support
When cross-compiling to a different platform from Windows, we should explicitly suffix the executable binary for invocation.
1 parent 45a5c45 commit 9ae81da

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shared/ICU/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,14 @@ if(BUILD_TOOLS)
651651

652652
set(ICU_TOOLS_DIR ${CMAKE_CURRENT_BINARY_DIR})
653653
elseif(ICU_TOOLS_DIR)
654+
if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
655+
set(CMAKE_HOST_EXECUTABLE_SUFFIX .exe)
656+
endif()
657+
654658
foreach(tool gencnval;gencfu;makeconv;genbrk;gensprep;gendict;icupkg;genrb;pkgdata)
655659
add_executable(${tool} IMPORTED)
656660
set_target_properties(${tool} PROPERTIES
657-
IMPORTED_LOCATION ${ICU_TOOLS_DIR}/${tool}${CMAKE_EXECUTABLE_SUFFIX})
661+
IMPORTED_LOCATION ${ICU_TOOLS_DIR}/${tool}${CMAKE_HOST_EXECUTABLE_SUFFIX})
658662
endforeach()
659663
else()
660664
include(ExternalProject)

0 commit comments

Comments
 (0)