I do see a similar question here: ninja appends its default installation path to my DESTDIR
But this time the problem is I am not using meson. I am working with cmake for c++ project, I used to use:
$(MAKE) install DESTDIR=
to skip DESTDIR earlier but using
DESTDIR= ninja install
will do nothing as it just prefixes existing path instead of changing it effectively, the motive is to skip debian/tmp based jailbreak for building and installing cmake external project.
Any suggestions welcome as well!