Skip to content

Commit 73e8a4c

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 73e8a4c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,19 @@ endif()
192192

193193
find_program(MSGFMT_EXE msgfmt)
194194
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)
195+
if(NO_GETEXT)
196+
if(MSGFMT_EXE)
197+
message(WARNING "MSGFMT_EXE is ignored under NO_GETTEXT")
198+
unset(MSGFMT_EXE)
199+
endif()
200+
else()
201+
if(USING_VCPKG)
202+
set(MSGFMT_EXE ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg/downloads/tools/msys2/msys64/usr/bin/msgfmt.exe)
203+
endif()
204+
if(NOT EXISTS ${MSGFMT_EXE})
205+
message(WARNING "Text Translations won't be built")
206+
unset(MSGFMT_EXE)
207+
endif()
201208
endif()
202209
endif()
203210

0 commit comments

Comments
 (0)