[CMake] CMake QT and QTLinguist
Andrew Maclean
andrew.amaclean at gmail.com
Sat Oct 24 17:58:09 EDT 2009
This is just what I need. Thank you very much.
Regards
Andrew
On Sat, Oct 24, 2009 at 10:48 AM, Clinton Stimpson <clinton at elemtech.com> wrote:
> On Thursday 22 October 2009 03:26:21 pm Andrew Maclean wrote:
>> Has anyone used QTLinguist with CMake and if so how?
>>
>> Regards
>> Andrew
>
> Do you mean to create .ts and .qm files?
>
> Here's an example of how to do it with cmake-gui.
>
> # just insert the languages you want to support in this list
> SET(LANGUAGES fr_FR)
>
> SET(LANGUAGE_TS_FILES)
> FOREACH(LANGUAGE ${LANGUAGES})
> SET(TS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake_${LANGUAGE}.ts")
> SET(LANGUAGE_TS_FILES ${LANGUAGE_TS_FILES} ${TS_FILE})
> SET_SOURCE_FILES_PROPERTIES(${TS_FILE} PROPERTIES OUTPUT_LOCATION
> "${CMake_BINARY_DIR}${CMAKE_DATA_DIR}/i18n")
> ENDFOREACH(LANGUAGE ${LANGUAGES})
> IF(LANGUAGE_TS_FILES)
> QT4_CREATE_TRANSLATION(qm_files ${SRCS} ${LANGUAGE_TS_FILES})
> ENDIF(LANGUAGE_TS_FILES)
>
> ADD_EXECUTABLE(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS} ${qm_files})
>
> The .ts files are updated in the source directory, so the translations can be
> saved. Then the person translating can run the Qt linguist on those .ts files.
>
> But there is also the QT4_ADD_TRANSLATION to do the .qm files for you if you
> want to do the .ts files manually near release time.
>
> Clint
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________
More information about the CMake
mailing list