CMake: remove unneeded link libraries from executables