Add DISABLE_NLS option

--- Source/Core/DolphinQt/CMakeLists.txt.orig	2018-09-17 22:03:07.626843000 +0200
+++ Source/Core/DolphinQt/CMakeLists.txt	2018-09-17 22:04:54.938302000 +0200
@@ -148,36 +148,39 @@
 endif()
 
 # Handle localization
-find_package(Gettext)
-if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE)
-  set(pot_file "${CMAKE_SOURCE_DIR}/Languages/po/dolphin-emu.pot")
-  file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po)
-
-  target_sources(dolphin-emu PRIVATE ${pot_file} ${LINGUAS})
-  source_group("Localization" FILES ${LINGUAS})
-  source_group("Localization\\\\Generated" FILES ${pot_file})
-
-  foreach(po ${LINGUAS})
-    get_filename_component(lang ${po} NAME_WE)
-    set(mo_dir ${CMAKE_CURRENT_BINARY_DIR}/${lang})
-    set(mo ${mo_dir}/dolphin-emu.mo)
-
-    target_sources(dolphin-emu PRIVATE ${mo})
-    source_group("Localization\\\\Generated" FILES ${mo})
-
-    if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      set_source_files_properties(${mo} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${lang}.lproj")
-    else()
-      install(FILES ${mo} DESTINATION share/locale/${lang}/LC_MESSAGES)
-    endif()
-
-    add_custom_command(OUTPUT ${mo}
-      COMMAND cmake -E make_directory ${mo_dir}
-      COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${po} ${pot_file}
-      COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
-      DEPENDS ${po}
-    )
-  endforeach()
+option(DISABLE_NLS "Disable native language support (NLS)" OFF)
+if(NOT DISABLE_NLS)
+  find_package(Gettext)
+  if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE)
+    set(pot_file "${CMAKE_SOURCE_DIR}/Languages/po/dolphin-emu.pot")
+    file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po)
+
+    target_sources(dolphin-emu PRIVATE ${pot_file} ${LINGUAS})
+    source_group("Localization" FILES ${LINGUAS})
+    source_group("Localization\\\\Generated" FILES ${pot_file})
+
+    foreach(po ${LINGUAS})
+      get_filename_component(lang ${po} NAME_WE)
+      set(mo_dir ${CMAKE_CURRENT_BINARY_DIR}/${lang})
+      set(mo ${mo_dir}/dolphin-emu.mo)
+
+      target_sources(dolphin-emu PRIVATE ${mo})
+      source_group("Localization\\\\Generated" FILES ${mo})
+
+      if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+        set_source_files_properties(${mo} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${lang}.lproj")
+      else()
+        install(FILES ${mo} DESTINATION share/locale/${lang}/LC_MESSAGES)
+      endif()
+
+      add_custom_command(OUTPUT ${mo}
+        COMMAND cmake -E make_directory ${mo_dir}
+        COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${po} ${pot_file}
+        COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
+        DEPENDS ${po}
+      )
+    endforeach()
+  endif()
 endif()
 
 if(APPLE)
