From f7e1c9c5103e7631be14f970df76bdb2b9818b76 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 9 May 2024 08:23:13 -0700 Subject: [PATCH] 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. --- shared/ICU/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/ICU/CMakeLists.txt b/shared/ICU/CMakeLists.txt index f5c70144..2617dab0 100644 --- a/shared/ICU/CMakeLists.txt +++ b/shared/ICU/CMakeLists.txt @@ -651,10 +651,14 @@ if(BUILD_TOOLS) set(ICU_TOOLS_DIR ${CMAKE_CURRENT_BINARY_DIR}) elseif(ICU_TOOLS_DIR) + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + set(CMAKE_HOST_EXECUTABLE_SUFFIX .exe) + endif() + foreach(tool gencnval;gencfu;makeconv;genbrk;gensprep;gendict;icupkg;genrb;pkgdata) add_executable(${tool} IMPORTED) set_target_properties(${tool} PROPERTIES - IMPORTED_LOCATION ${ICU_TOOLS_DIR}/${tool}${CMAKE_EXECUTABLE_SUFFIX}) + IMPORTED_LOCATION ${ICU_TOOLS_DIR}/${tool}${CMAKE_HOST_EXECUTABLE_SUFFIX}) endforeach() else() include(ExternalProject)