Skip to content

Commit 2110c8f

Browse files
committed
cmake: add warning for ignored MSGFMT_EXE
It does not make sense to attempt to set MSGFMT_EXE when NO_GETTEXT is configured, as such add a check for NO_GETTEXT before attempting to set it. Suggested-by: Johannes Schindelin <[email protected]> Signed-off-by: Matthew Rogers <[email protected]>
1 parent a3b5eef commit 2110c8f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,18 @@ if(WIN32 AND NOT MSVC)#not required for visual studio builds
189189
endif()
190190
endif()
191191

192-
find_program(MSGFMT_EXE msgfmt)
193-
if(NOT MSGFMT_EXE)
194-
if (USE_VCPKG)
195-
set(MSGFMT_EXE ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg/downloads/tools/msys2/msys64/usr/bin/msgfmt.exe)
196-
endif()
197-
if(NOT EXISTS ${MSGFMT_EXE})
198-
message(WARNING "Text Translations won't be built")
199-
unset(MSGFMT_EXE)
192+
if(NO_GETTEXT)
193+
message(STATUS "msgfmt not used under NO_GETTEXT")
194+
else()
195+
find_program(MSGFMT_EXE msgfmt)
196+
if(NOT MSGFMT_EXE)
197+
if(USE_VCPKG)
198+
set(MSGFMT_EXE ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg/downloads/tools/msys2/msys64/usr/bin/msgfmt.exe)
199+
endif()
200+
if(NOT EXISTS ${MSGFMT_EXE})
201+
message(WARNING "Text Translations won't be built")
202+
unset(MSGFMT_EXE)
203+
endif()
200204
endif()
201205
endif()
202206

0 commit comments

Comments
 (0)