Dependencies in CMake should be handled with find_package, not add_subdirectory. This posts tries to explain why and how.