Regenerate pot/po files only if input has changed

A custom target with ALL is always generated, even if the files/outputs
specified with DPENDS are not changed.

This can be solved by generating the POT files with a custom_command.
The target triggers evaluation of the custom_command, but the latter will
only be run if the dependencies have changed.

Fixes #1479
diff --git a/utils/po/CMakeLists.txt b/utils/po/CMakeLists.txt
index 5cd3a90..2eb7f0f 100644
--- a/utils/po/CMakeLists.txt
+++ b/utils/po/CMakeLists.txt
@@ -15,12 +15,14 @@
     list(APPEND _commands
       COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} "${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}")
-  add_custom_target(update_pot_${input}
-                    ALL
+  add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile}
                     COMMAND xgettext --keyword=_ --language=c++ --package-name=pdfsig --output-dir=po --output=${_potFile} ${input}.cc
-                    DEPENDS ../${input}.cc
+                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../${input}.cc
+  add_custom_target(update_pot_${input}
+                    ALL
+                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_potFile})