xmake.lua 998 B

123456789101112131415161718192021222324252627282930
  1. package("pca9685")
  2. set_homepage("https://github.com/chaoticmachinery/pca9685")
  3. set_description("PCA9685 C++ Library. Works with SunFounder")
  4. set_license("LGPL-2.1")
  5. set_urls("https://github.com/chaoticmachinery/pca9685.git")
  6. add_versions("2017.12.07", "6f9794d888f77b863884c3eac933b75a07101347")
  7. on_install("linux", function (package)
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.debug", "mode.release")
  10. target("pca9685")
  11. set_kind("$(kind)")
  12. set_languages("c++11")
  13. add_files("PCA9685.cpp")
  14. add_headerfiles("PCA9685.h")
  15. ]])
  16. local configs = {}
  17. import("package.tools.xmake").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. assert(package:check_cxxsnippets({test = [[
  21. #include "PCA9685.h"
  22. void test() {
  23. PCA9685 pwm;
  24. }
  25. ]]}, {configs = {languages = "c++11"}}))
  26. end)