xmake.lua 1.3 KB

123456789101112131415161718192021222324252627282930
  1. package("ade")
  2. set_homepage("https://github.com/opencv/ade")
  3. set_description("ADE Framework is a graph construction, manipulation, and processing framework.")
  4. set_license("Apache-2.0")
  5. add_urls("https://github.com/opencv/ade/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/opencv/ade.git")
  7. add_versions("v0.1.2d", "edefba61a33d6cd4b78a9976cb3309c95212610a81ba6dade09882d1794198ff")
  8. add_versions("v0.1.2", "ac2e6a4acbe6e0b0942418687ec37c6cd55dcaec5112c7ca09abefe6ee539499")
  9. add_patches("0.1.2", "patches/0.1.2/cmake-mingw.patch", "59ac0ed938b82090e97de6dee358ba683b371908c3063b4d10146999a30eaaaa")
  10. add_deps("cmake")
  11. on_install(function (package)
  12. local configs = {}
  13. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  14. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  15. table.insert(configs, "-DBUILD_WITH_STATIC_CRT=" .. (package:has_runtime("MT") and "ON" or "OFF"))
  16. import("package.tools.cmake").install(package, configs)
  17. end)
  18. on_test(function (package)
  19. assert(package:check_cxxsnippets({test = [[
  20. void test() {
  21. ade::Graph x;
  22. }
  23. ]]}, {configs = {languages = "c++11"}, includes = "ade/graph.hpp"}))
  24. end)