libgpiod: fix cxx bindings not having c links (#2991)

pull/2992/head
Chi Huu Huynh 11 months ago committed by GitHub
parent f152b68049
commit 393436a2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      packages/l/libgpiod/port/xmake.lua

@ -22,13 +22,23 @@ if has_config("enable_bindings_cxx") then
set_kind("$(kind)") set_kind("$(kind)")
set_languages("cxx17") set_languages("cxx17")
add_headerfiles("include/(gpiod.h)")
add_headerfiles("lib/uapi/*.h")
add_files("lib/*.c")
add_includedirs("include")
add_headerfiles("bindings/cxx/(gpiod.hpp)") add_headerfiles("bindings/cxx/(gpiod.hpp)")
add_headerfiles("bindings/cxx/(gpiodcxx/**.hpp)") add_headerfiles("bindings/cxx/(gpiodcxx/**.hpp)")
add_files("bindings/cxx/*.cpp") add_files("bindings/cxx/*.cpp")
add_includedirs("bindings/cxx", {public = true}) add_includedirs("bindings/cxx", {public = true})
add_deps("gpiod") before_build(function (target)
local configure = io.readfile("configure.ac")
local version = configure:match("AC_INIT%(%[libgpiod%], %[?([0-9%.]+)%]?%)")
target:add("defines", "GPIOD_VERSION_STR=\"" .. version .. "\"")
end)
end end
if has_config("enable_tools") then if has_config("enable_tools") then

Loading…
Cancel
Save