the files
  CMakeLists.txt
  gmsh_closest_points.cpp
correspond to 
gmsh-2.6.1-source
they should go into
gmsh-2.6.1-source/utils/api_demos/

They are subject to the same license as gmsh, see
  http://geuz.org/gmsh/
.

this can be build with cmake there.
so far only the dynamically linked version works:
make gmsh_closest_points_shared
cp ./gmsh_closest_points_shared  ~/bin/gmsh_closest_points
