cppgpio: add package (#2986)

* cppgpio: add package

* cppgpio: add_includedirs
pull/2987/head
Chi Huu Huynh 11 months ago committed by GitHub
parent 15b61bf02c
commit 7f7d4d9543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      packages/c/cppgpio/xmake.lua

@ -0,0 +1,32 @@
package("cppgpio")
set_homepage("https://github.com/JoachimSchurig/CppGPIO")
set_description("C++14 GPIO library for embedded systems on Linux")
add_urls("https://github.com/JoachimSchurig/CppGPIO/archive/refs/tags/$(version).tar.gz",
"https://github.com/JoachimSchurig/CppGPIO.git")
add_versions("v1.0.2", "53172c0f02516861bca1d1095d9275d569427ec99d63ca2b21ab8d42589c6bb1")
on_install("linux", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("cppgpio")
set_kind("$(kind)")
set_languages("cxx14")
add_files("src/*.cpp")
add_includedirs("include")
add_headerfiles("include/(**.hpp)")
add_headerfiles("src/tools.hpp")
]])
import("package.tools.xmake").install(package)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <cppgpio.hpp>
using namespace GPIO;
void test() {
PWMOut pwm(23, 100, 0);
}
]]}, {configs = {languages = "c++14"}}))
end)
Loading…
Cancel
Save