Handle non-target libraries in CMake utils.