cmake: Rename PNG_EXECUTABLES to PNG_TOOLS

For the sake of consistency with a recent addition to the configure
script, the option name PNG_EXECUTABLES (introduced in libpng-1.6.38)
shall become PNG_TOOLS.

PNG_EXECUTABLES is still maintained as a deprecated option, allowing
the applications that use it to be built without modification, but a
deprecation warning will be issued.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8de5ddb..e163699 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,11 +69,22 @@
 option(PNG_SHARED "Build libpng as a shared lib" ON)
 option(PNG_STATIC "Build libpng as a static lib" ON)
 option(PNG_FRAMEWORK "Build libpng as a Mac OS X framework" OFF)
-option(PNG_EXECUTABLES "Build libpng executables" ON)
-option(PNG_TESTS "Build libpng tests" ON)
+option(PNG_TESTS "Build the libpng tests" ON)
+option(PNG_TOOLS "Build the libpng tools" ON)
 option(PNG_DEBUG "Enable debug output" OFF)
 option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON)
 
+# Maintain backwards compatibility with the deprecated option PNG_EXECUTABLES.
+option(PNG_EXECUTABLES "[Deprecated; please use PNG_TOOLS]" ON)
+if(NOT PNG_EXECUTABLES)
+  message(DEPRECATION "The option PNG_EXECUTABLES has been deprecated in favour of PNG_TOOLS")
+  if(PNG_TOOLS)
+    message(AUTHOR_WARNING
+            "Setting PNG_TOOLS to ${PNG_EXECUTABLES}, to stay compatible with PNG_EXECUTABLES")
+    set(PNG_TOOLS "${PNG_EXECUTABLES}")
+  endif()
+endif()
+
 # Allow the users to specify a location of zlib.
 # Useful if zlib is being built alongside this as a sub-project.
 option(PNG_BUILD_ZLIB "Custom zlib location, else find_package is used" OFF)
@@ -879,7 +890,7 @@
                FILES ${PNGSUITE_PNGS})
 endif()
 
-if(PNG_SHARED AND PNG_EXECUTABLES)
+if(PNG_SHARED AND PNG_TOOLS)
   add_executable(pngfix ${pngfix_sources})
   target_link_libraries(pngfix png_shared)
   set(PNG_BIN_TARGETS pngfix)