--- tigervnc-1.9.0/vncviewer/CMakeLists.txt.old	2018-07-16 14:08:55.000000000 +0000
+++ tigervnc-1.9.0/vncviewer/CMakeLists.txt	2018-07-25 05:43:25.670000000 +0000
@@ -66,14 +66,7 @@
 
   configure_file(vncviewer.desktop.in.in vncviewer.desktop.in)
   find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
-  if("${GETTEXT_VERSION_STRING}" VERSION_GREATER 0.18.99)
-    add_custom_command(OUTPUT vncviewer.desktop
-      COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
-                --desktop --template vncviewer.desktop.in
-                -d ${CMAKE_SOURCE_DIR}/po -o vncviewer.desktop
-      DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
-    )
-  elseif(INTLTOOL_MERGE_EXECUTABLE)
+  if(INTLTOOL_MERGE_EXECUTABLE)
     add_custom_command(OUTPUT vncviewer.desktop
       COMMAND sed -e 's/^Name/_Name/'
                 -e 's/^GenericName/_GenericName/'
@@ -84,6 +77,13 @@
                 vncviewer.desktop.intl vncviewer.desktop
       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
     )
+  elseif("${GETTEXT_VERSION_STRING}" VERSION_GREATER 0.18.99)
+    add_custom_command(OUTPUT vncviewer.desktop
+      COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
+                --desktop --template vncviewer.desktop.in
+                -d ${CMAKE_SOURCE_DIR}/po -o vncviewer.desktop
+      DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
+    )
   else()
     add_custom_command(OUTPUT vncviewer.desktop
       COMMAND cp vncviewer.desktop.in vncviewer.desktop