When the CMAKE_CURRENT_BINARY_DIR is the same than CMAKE_BINARY_DIR,
the computed relative path is empty and the target name starts with a
/, inserting a double slash // in the path at the same time.
This diff fixes the issue by not prepending the relative path to the
target name if it is empty.