Merge pull request #110730 from lopsided98/spdlog-fmt-propagate

spdlog: propagate fmt
This commit is contained in:
Jörg Thalheim 2021-01-27 14:08:41 +00:00 committed by GitHub
commit 3285bc8219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,8 @@ let
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ fmt ]; # spdlog <1.3 uses a bundled version of fmt
propagatedBuildInputs = lib.optional (lib.versionAtLeast version "1.3") fmt;
cmakeFlags = [ cmakeFlags = [
"-DSPDLOG_BUILD_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" "-DSPDLOG_BUILD_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
@ -25,7 +26,9 @@ let
"-DSPDLOG_FMT_EXTERNAL=ON" "-DSPDLOG_FMT_EXTERNAL=ON"
]; ];
outputs = [ "out" "doc" ]; outputs = [ "out" "doc" ]
# spdlog <1.4 is header only, no need to split libraries and headers
++ lib.optional (lib.versionAtLeast version "1.4") "dev";
postInstall = '' postInstall = ''
mkdir -p $out/share/doc/spdlog mkdir -p $out/share/doc/spdlog