- add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/${domain}.pot
- BYPRODUCTS ${PROJECT_BINARY_DIR}/${domain}.pot-tmp
- COMMAND msgcomm --more-than=0 --sort-by-file
+ #
+ # Make sure the .pot-tmp has no line numbers, to avoid useless rebuilding
+ # of .mo files.
+ add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot
+ BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp
+ COMMAND msgcomm --more-than=0 --omit-header --sort-by-file --add-location=file