cmake: clean up linked libraries