Generate translation files rather than packaging them
[quassel.git] / CMakeLists.txt
index 16dac30..884097f 100644 (file)
@@ -32,7 +32,8 @@ option(DEPLOY        "Mac OS X only! Adds required libs to bundle resources and
 option(SPUTDEV       "Do not use!" OFF)
 
 set(QT "" CACHE STRING "Path to a Qt installation to use instead of the system Qt")
-
+set(LINGUAS "" CACHE STRING "Space-separated List of locales specifying languages that should be compiled")
 if(STATIC)
   set(CMAKE_BUILD_TYPE Release)
 endif(STATIC)
@@ -111,8 +112,11 @@ endif(WANT_QTCLIENT OR WANT_MONO)
 # Make sure version.gen exists before building mod_common
 add_dependencies(mod_common genversion_run)
 
+include(QuasselGenerateTranslations)
+quassel_generate_i18n_resource(RC_I18N ${LINGUAS})
+
 # Add resources
-qt4_add_resources(RC_I18N i18n/i18n.qrc)
+#qt4_add_resources(RC_I18N i18n/i18n.qrc)
 qt4_add_resources(RC_ICONS src/icons/icons.qrc)
 qt4_add_resources(RC_QUASSEL_ICONS src/icons/quassel-icons.qrc)
 qt4_add_resources(RC_SQL src/core/sql.qrc)