Skip to content

Commit 07763a9

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 c3bf266 commit 07763a9

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
@@ -190,14 +190,18 @@ if(WIN32 AND NOT MSVC)#not required for visual studio builds
190190
endif()
191191
endif()
192192

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

0 commit comments

Comments
 (0)