This patch adds gettext support for our new vncviewer. CMake only. The
change of the project name is to make the CMake build behave like the
Autotools build - define PACKAGE_NAME in the same way.



git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4388 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 498c614..7322cbc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@
 include(CheckCSourceCompiles)
 include(CheckCXXSourceCompiles)
 
-project(TigerVNC)
+project(tigervnc)
 set(VERSION 1.0.90)
 
 # The RC version must always be four comma-separated numbers
@@ -123,6 +123,11 @@
   set(USE_INCLUDED_ZLIB 1)
 endif()
 
+# Check for gettext
+option(ENABLE_NLS "Enable translation of program messages" ON)
+find_package(Gettext)
+set(LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale")
+
 # Check for libjpeg
 find_package(JPEG REQUIRED)
 
@@ -199,5 +204,6 @@
 endif()
 
 if(BUILD_NEW_VNCVIEWER)
+  add_subdirectory(po)
   add_subdirectory(vncviewer)
 endif()