add date 3.0.1 (#523)

* add date 3.0.1

* Fix indent

* Fix typo
pull/527/head
jj683 4 years ago committed by GitHub
parent ab82b66e47
commit aad84d5342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      packages/d/date/xmake.lua

@ -0,0 +1,25 @@
package("date")
set_homepage("https://github.com/HowardHinnant/date")
set_description("A date and time library for use with C++11 and C++14.")
set_license("MIT")
add_urls("https://github.com/HowardHinnant/date/archive/refs/tags/$(version).zip",
"https://github.com/HowardHinnant/date.git")
add_versions("v3.0.1", "f4300b96f7a304d4ef9bf6e0fa3ded72159f7f2d0f605bdde3e030a0dba7cf9f")
add_deps("cmake")
on_install(function (package)
local configs = {"-DBUILD_TZ_LIB=ON",
"-DUSE_SYSTEM_TZ_DB=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cxxtypes("date::sys_days", {configs = {languages = "c++11"}, includes = "date/date.h"}))
assert(package:has_cxxtypes("date::time_zone", {configs = {languages = "c++11"}, includes = "date/tz.h"}))
end)
Loading…
Cancel
Save