From cf071ccdad2804cdf9a73b44b825b00304bc3a94 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 14 Dec 2009 22:45:07 +0200 Subject: [PATCH] CMake - build GUI translation files. --- gui/CMakeLists.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 5017eed72..a8ac45ab8 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -62,6 +62,17 @@ SET(CHECK_UIS settings.ui ) +# Translation files +SET(CHECK_TRANS + cppcheck_de.ts + cppcheck_fi.ts + cppcheck_pl.ts + cppcheck_se.ts + cppcheck_en.ts + cppcheck_nl.ts + cppcheck_ru.ts +) + SET(CHECK_RCCS gui.qrc) # Generate rules for building source files from the resources @@ -73,11 +84,15 @@ QT4_WRAP_UI(CHECK_UIS_H ${CHECK_UIS}) # Mock header files QT4_WRAP_CPP(CHECK_MOC_SRCS ${CHECK_HEADERS}) +# add translations ... +QT4_ADD_TRANSLATION(CHECK_QM ${CHECK_TRANS}) + include_directories (${CPPCHECK_SOURCE_DIR}/lib) # Include binary directory where code from UI files gets created include_directories(${CMAKE_CURRENT_BINARY_DIR}) -ADD_EXECUTABLE(gui ${CHECKGUI_SRCS} ${CHECK_MOC_SRCS} ${CHECK_UIS_H} ${CHECK_RCC_SRCS}) +ADD_EXECUTABLE(gui ${CHECKGUI_SRCS} ${CHECK_MOC_SRCS} ${CHECK_UIS_H} + ${CHECK_RCC_SRCS} ${CHECK_QM}) TARGET_LINK_LIBRARIES(gui checklib ${QT_LIBRARIES})