cmake: fall back to using vcpkg's msgfmt.exe on Windows

We are already relying on `vcpkg` to manage our dependencies, including
`libiconv`. Let's also use the `msgfmt.exe` from there.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin 2020-09-30 15:26:18 +00:00 committed by Junio C Hamano
parent e18ae4e7a6
commit 8f45138725

View file

@ -152,7 +152,11 @@ endif()
find_program(MSGFMT_EXE msgfmt)
if(NOT MSGFMT_EXE)
message(WARNING "Text Translations won't be build")
set(MSGFMT_EXE ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg/downloads/tools/msys2/msys64/usr/bin/msgfmt.exe)
if(NOT EXISTS ${MSGFMT_EXE})
message(WARNING "Text Translations won't be built")
unset(MSGFMT_EXE)
endif()
endif()
#Force all visual studio outputs to CMAKE_BINARY_DIR