]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cmake: fall back to using `vcpkg`'s `msgfmt.exe` on Windows
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 30 Sep 2020 15:26:18 +0000 (15:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Sep 2020 20:25:59 +0000 (13:25 -0700)
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>
contrib/buildsystems/CMakeLists.txt

index 12268f61bab2072f323915cd21c1641f1719190a..02241dcc7784f68da54402a665801f74f1382c27 100644 (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