Properly detect fmt (#9223)
commit6bf467119b06f4838a22dcc5e577ed4c4d4c9367
authorYang, Bo <pop.atry@gmail.com>
Fri, 23 Sep 2022 23:22:30 +0000 (23 16:22 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 23 Sep 2022 23:22:30 +0000 (23 16:22 -0700)
tree95864bec114d69df2792c6199bfacaaddf0f415e
parent26ea32a73a2282641ca580299aa8a3b087bf9a1d
Properly detect fmt (#9223)

Summary:
We tried to use fmt_8 from nix package in https://github.com/facebook/hhvm/issues/9131, however it did not take effect because the target created by find_package is `fmt::fmt`, not `fmt`.

This PR properly detect `fmt::fmt`, and create a `fmt` as a proxy to `fmt::fmt`.

Pull Request resolved: https://github.com/facebook/hhvm/pull/9223

Test Plan:
Run GitHub Action. The following line should be included in the build log:
```
hhvm> -- Using system fmt: /nix/store/qcgg8plb11j9dcz4r22hsaps2qfq8bnm-fmt-8.1.1-dev/lib/cmake/fmt
```

See https://github.com/facebook/hhvm/actions/runs/3110469220/jobs/5041685489

Reviewed By: Wilfred

Differential Revision: D39760260

Pulled By: Atry

fbshipit-source-id: 5fa9b7b50560499c6162b06720ba63e33460f9f9
third-party/fmt/CMakeLists.txt