[CMAKE] Fix the native build when the target is in the current build dir
Summary:
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.
Test Plan:
Build bitcoin-abc and secp256k1 standalone.
See Travis result from my secp256k1 repo fork:
https://travis-ci.org/Fabcien/secp256k1/builds/639912900
Depends on D5033 to make Travis happy.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5034