core: fix cmake warning CMP0007 on "make uninstall" (bug #41528)