Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix detection and dep on glog::glog when building via cmake
Summary: folly exports a dependency on `glog::glog`. That causes dependent packages to also depend implicitly on glog::glog with no way to resolve what that means, resulting in errors like this: ``` CMake Error at CMakeLists.txt:106 (add_library): Target "wangle" links to target "glog::glog" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? ``` We cannot rely on `glog` having installed its configuration for a simple `find_package(glog CONFIG)`; the version of `glog` provided by some versions of ubuntu doesn't install a `.cmake` file for this. That means that we need to detect it for ourselves. This diff enhances the `FindGlog.cmake` script to define a `glog::glog` target so that we can consistently depend upon it throughout the set of related packages. It is unfortunate that we have duplication of the `FindGlog.cmake` files across these projects; a follow up diff could place these in eg: fbcode_builder and arrange to have shipit to copy them to the right place at shipit time. Reviewed By: strager Differential Revision: D13482288 fbshipit-source-id: d19716871edce29019114030e4c82911ac345adb
- Loading branch information