[CMake] how to configure cmake to help translate?

Quân Phạm Minh quanpm4186 at gmail.com
Tue Mar 6 22:55:58 EST 2012


I've read this link
http://www.cmake.org/Wiki/CMake:How_To_Build_Qt4_Software and I type code
below

set(${PROJECT_NAME}_HDRS
mainwindow.h
item.h
)
set(${PROJECT_NAME}_SRCS
main.cpp
mainwindow.cpp
item.cpp
)
SET(UPDATE_TRANSLATIONS TRUE)
SET(GLOB TRANSLATION_FILES FILES translations/*.ts)
SET(FILES_TO_TRANSLATE )
set(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${${PROJECT_NAME}_SRCS})
if(UPDATE_TRANSLATIONS)
    QT4_CREATE_TRANSLATION(QM_FILE ${CMAKE_SOURCE_DIR}/translations
${FILES_TO_TRANSLATE} ${TRANSLATION_FILES})
else(UPDATE_TRANSLATIONS)
    QT4_ADD_TRANSLATION(${CMAKE_SOURCE_DIR}/translations
${TRANSLATION_FILES})
endif(UPDATE_TRANSLATIONS)

where translations is folder in source folder, but cmake don't return any
result. Help me fix this bug! Thank in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120307/fd7ce3dd/attachment-0001.htm>


More information about the CMake mailing list