spdlog: allow using vendored fmt library (#33379)
This commit is contained in:
parent
86337f042e
commit
5f99d3dfaa
1 changed files with 9 additions and 4 deletions
|
@ -45,13 +45,18 @@ class Spdlog(CMakePackage):
|
|||
version("0.9.0", sha256="bbbe5a855c8b309621352921d650449eb2f741d35d55ec50fb4d8122ddfb8f01")
|
||||
|
||||
variant("shared", default=True, description="Build shared libraries (v1.4.0+)")
|
||||
variant(
|
||||
"fmt_external",
|
||||
default=False,
|
||||
description="Build using external fmt libraries instead of bundled one",
|
||||
)
|
||||
|
||||
depends_on("cmake@3.2:", when="@:1.7.0", type="build")
|
||||
depends_on("cmake@3.10:", when="@1.8.0:", type="build")
|
||||
|
||||
depends_on("fmt@5.3:")
|
||||
depends_on("fmt@7:", when="@1.7:")
|
||||
depends_on("fmt@8:", when="@1.9:")
|
||||
depends_on("fmt@5.3:", when="+fmt_external")
|
||||
depends_on("fmt@7:", when="@1.7: +fmt_external")
|
||||
depends_on("fmt@8:", when="@1.9: +fmt_external")
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
|
@ -60,7 +65,7 @@ def cmake_args(self):
|
|||
args.extend(
|
||||
[
|
||||
self.define_from_variant("SPDLOG_BUILD_SHARED", "shared"),
|
||||
self.define("SPDLOG_FMT_EXTERNAL", "ON"),
|
||||
self.define_from_variant("SPDLOG_FMT_EXTERNAL", "fmt_external"),
|
||||
# tests and examples
|
||||
self.define("SPDLOG_BUILD_TESTS", self.run_tests),
|
||||
self.define("SPDLOG_BUILD_EXAMPLE", self.run_tests),
|
||||
|
|
Loading…
Reference in a new issue