From 90b1ef10192b306fd88ab11482d6767432cb2636 Mon Sep 17 00:00:00 2001 From: Chi Huu Huynh <73843190+Chi-EEE@users.noreply.github.com> Date: Fri, 22 Dec 2023 03:36:32 +0000 Subject: [PATCH] pca9685: add package (#2983) * pca9685: add package * pca9685: remove macosx --- packages/p/pca9685/xmake.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 packages/p/pca9685/xmake.lua diff --git a/packages/p/pca9685/xmake.lua b/packages/p/pca9685/xmake.lua new file mode 100644 index 00000000000..d38a7f07985 --- /dev/null +++ b/packages/p/pca9685/xmake.lua @@ -0,0 +1,30 @@ +package("pca9685") + set_homepage("https://github.com/chaoticmachinery/pca9685") + set_description("PCA9685 C++ Library. Works with SunFounder") + set_license("LGPL-2.1") + + set_urls("https://github.com/chaoticmachinery/pca9685.git") + + add_versions("2017.12.07", "6f9794d888f77b863884c3eac933b75a07101347") + + on_install("linux", function (package) + io.writefile("xmake.lua", [[ + add_rules("mode.debug", "mode.release") + target("pca9685") + set_kind("$(kind)") + set_languages("c++11") + add_files("PCA9685.cpp") + add_headerfiles("PCA9685.h") + ]]) + local configs = {} + import("package.tools.xmake").install(package, configs) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include "PCA9685.h" + void test() { + PCA9685 pwm; + } + ]]}, {configs = {languages = "c++11"}})) + end)