commit
24543ede40
1 changed files with 33 additions and 0 deletions
@ -0,0 +1,33 @@ |
||||
package("fmt") |
||||
|
||||
set_homepage("https://fmt.dev") |
||||
set_description("fmt is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams.") |
||||
|
||||
set_urls("https://github.com/fmtlib/fmt/releases/download/$(version)/fmt-$(version).zip") |
||||
add_versions("6.0.0", "b4a16b38fa171f15dbfb958b02da9bbef2c482debadf64ac81ec61b5ac422440") |
||||
add_versions("5.3.0", "4c0741e10183f75d7d6f730b8708a99b329b2f942dad5a9da3385ab92bb4a15c") |
||||
|
||||
if is_plat("linux", "macosx") then |
||||
add_deps("cmake") |
||||
end |
||||
|
||||
on_install("windows", function (package) |
||||
os.cp("include/fmt", package:installdir("include")) |
||||
end) |
||||
|
||||
on_install("linux", "macosx", function (package) |
||||
import("package.tools.cmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <fmt/format.h> |
||||
#include <string> |
||||
#include <assert.h> |
||||
static void test() { |
||||
std::string s = fmt::format("{}", "hello"); |
||||
assert(s == "hello"); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "fmt/format.h", defines="FMT_HEADER_ONLY"})) |
||||
end) |
||||
|
Loading…
Reference in new issue