|
From: Yoda-JM <yo...@us...> - 2009-12-29 10:44:34
|
Module: performous
Branch: master
Commit: 43fce1c7f4e49ff4fcdb02531ee45d65762cef0e
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Dec 29 11:44:17 2009 +0100
Fixed some case errors, allow locales install directory configuration
---
CMakeLists.txt | 20 +++++++++++---------
lang/CMakeLists.txt | 4 ++--
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0431d31..3b9eb29 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,18 +35,20 @@ include_directories(libs/libda/include)
#need to put here do setting LOCALE_DIR variable
find_package(Gettext)
if(Gettext_FOUND)
- if(WIN32)
- SET(LOCALE_DIR "../locale")
- elseif(APPLE)
- SET(LOCALE_DIR "share/locale")
- else()#other os
- SET(LOCALE_DIR "/usr/share/locale")
- endif(WIN32)
+ if(not LOCALE_DIR)
+ if(WIN32)
+ SET(LOCALE_DIR "../locale")
+ elseif(APPLE)
+ SET(LOCALE_DIR "share/locale")
+ else()#other os
+ SET(LOCALE_DIR "/usr/share/locale")
+ endif(WIN32)
+ endif(not LOCALE_DIR)
if(NOT LOCALE_DIR)
message(QUIET "Set LOCALE_DIR to path to get Gettext working")
else()
- find_package(msgfmt)
+ find_package(Msgfmt)
if(Msgfmt_FOUND)
message(STATUS "Found msgfmt to convert language file. Translation enabled")
add_subdirectory(lang)
@@ -77,4 +79,4 @@ endif (ENABLE_TOOLS)
if(WIN32)
option(ENABLE_VERSIONING "Add number version information. This allows to add version information to exe. Be carefull, in beta (and a lot useless)" OFF)
-endif(WIN32)
\ No newline at end of file
+endif(WIN32)
diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt
index 7c141dd..7ec5c9c 100644
--- a/lang/CMakeLists.txt
+++ b/lang/CMakeLists.txt
@@ -4,5 +4,5 @@ foreach(language ${LANGUAGES})
string(REGEX REPLACE "(.+(\\\\|/))+" "" language ${language})
string(REGEX REPLACE "\\.po$" "" language ${language})
execute_process(COMMAND ${Msgfmt_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/${language}.po -o ${CMAKE_CURRENT_BINARY_DIR}/${language}.mo)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${language}.mo DESTINATION ${LOCALE_DIR}/${language}/LC_MESSAGES RENAME ${CMAKE_PROJECT_NAME}.mo)
-endforeach(language)
\ No newline at end of file
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${language}.mo DESTINATION ${LOCALE_DIR}/${language}/LC_MESSAGES RENAME performous.mo)
+endforeach(language)
|