cmake: don't always create .qm files

The cmake keywords still confuse me at times.
A custom target is always recreated. How silly. But the correct (I think)
implementation is actually easier...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-04-04 16:19:45 -07:00
parent 41c5b95ee1
commit b79c01ab7c

View file

@ -432,11 +432,7 @@ 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_CUSTOM_TARGET(
generate_translations_${TRANSLATION_TARGET}
DEPENDS ${CMAKE_BINARY_DIR}/${TRANSLATION_QM}
)
ADD_DEPENDENCIES(subsurface generate_translations_${TRANSLATION_TARGET})
ADD_DEPENDENCIES(subsurface ${CMAKE_BINARY_DIR}/${TRANSLATION_QM})
set(TRANSLATIONS ${TRANSLATIONS} ${CMAKE_BINARY_DIR}/${TRANSLATION_QM})
endforeach()