cmake: try to get the dependency on the .qm files right

This is still not something I'm 100% sure I got right. But at least now it
correctly rebuilds the .qm files...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-04-04 21:59:51 -07:00
parent 1ed1e188fd
commit ce3a169cf9

View file

@ -443,9 +443,9 @@ foreach(TRANSLATION ${TRANSLATION_SRC})
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/translations \\; ${LRELEASE} ${CMAKE_SOURCE_DIR}/${TRANSLATION} -qm ${CMAKE_BINARY_DIR}/${TRANSLATION_QM}
DEPENDS ${TRANSLATION}
)
ADD_DEPENDENCIES(subsurface ${CMAKE_BINARY_DIR}/${TRANSLATION_QM})
set(TRANSLATIONS ${TRANSLATIONS} ${CMAKE_BINARY_DIR}/${TRANSLATION_QM})
endforeach()
SET_SOURCE_FILES_PROPERTIES(main.cpp PROPERTIES OBJECT_DEPENDS "${TRANSLATIONS}")
if(QT_TRANSLATION_DIR STREQUAL "")
set(QT_TRANSLATION_DIR ${Qt5Core_DIR}/../../../translations)