[cmake] Improve third party libraries support (#461)

2 files changed