Skip to content

Commit

Permalink
libgpiod: fix cxx bindings not having c links (#2991)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE authored Dec 24, 2023
1 parent f152b68 commit 393436a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/l/libgpiod/port/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,23 @@ if has_config("enable_bindings_cxx") then
set_kind("$(kind)")
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/(gpiodcxx/**.hpp)")
add_files("bindings/cxx/*.cpp")

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

if has_config("enable_tools") then
Expand Down

0 comments on commit 393436a

Please sign in to comment.