diff options
author | Bernd Wachter <bwachter-oops@lart.info> | 2009-04-08 06:01:03 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-08 10:28:20 +0200 |
commit | 5a0097103324dbe4754ed420fbdf9b33e8b12b0c (patch) | |
tree | 8f978734c25cbddfb475186d769a51eafd0d277a | |
parent | da339701474848499dafa41eaaa1a79be5f1de46 (diff) | |
download | mana-5a0097103324dbe4754ed420fbdf9b33e8b12b0c.tar.gz mana-5a0097103324dbe4754ed420fbdf9b33e8b12b0c.tar.bz2 mana-5a0097103324dbe4754ed420fbdf9b33e8b12b0c.tar.xz mana-5a0097103324dbe4754ed420fbdf9b33e8b12b0c.zip |
Added switch to disable building locales Only build locales if gettext is available Add a workaround for a cmake-bug in translations target
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | po/CMakeLists.txt | 11 |
2 files changed, 17 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2264e812..e20ec309 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,10 @@ SET(VERSION 0.0.29) # where to look for cmake modules SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules) +FIND_PACKAGE(Gettext) + OPTION(WITH_OPENGL "Enable OpenGL support" ON) +OPTION(ENABLE_NLS "Enable building of tranlations" ON) IF (WIN32) SET(PKG_DATADIR ".") @@ -21,6 +24,9 @@ ENDIF (WIN32) ADD_SUBDIRECTORY(data) ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(po) + +IF (GETTEXT_FOUND AND ENABLE_NLS) + ADD_SUBDIRECTORY(po) +ENDIF() INSTALL(FILES tmw.desktop DESTINATION share/applications) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 1c634a89..93d94f3a 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -1,4 +1,13 @@ FIND_PACKAGE(Gettext REQUIRED) FILE(GLOB POFILES *.po) -GETTEXT_CREATE_TRANSLATIONS(tmw.pot ${POFILES})
\ No newline at end of file +GETTEXT_CREATE_TRANSLATIONS(tmw.pot ${POFILES}) +# This is an ugly hack to enable building of translations with +# the default target due to a bug in GETTEXT_CREATE_TRANSLATIONS. +# The bug has been fixed in recent CMake 2.6.3. Once 2.6.3 is widely +# deployed the above line should be changed to: +# GETTEXT_CREATE_TRANSLATIONS(tmw.pot ALL ${POFILES}) +# and the following two lines removed +# 2009-04-08 Bernd Wachter <bwachter-tmw@lart.info> +ADD_CUSTOM_TARGET(transfix ALL) +ADD_DEPENDENCIES(transfix translations) |