improve wxwidget for gtk3

wxwidget
ruki 2 years ago
parent c4d3570100
commit 8450c503dc
  1. 2
      .github/workflows/ubuntu.yml
  2. 13
      packages/w/wxwidgets/xmake.lua

@ -29,7 +29,7 @@ jobs:
run: |
# TODO we will remove it later
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip libgtk-3-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 60

@ -92,6 +92,19 @@ package("wxwidgets")
table.insert(configs, "-DwxBUILD_DEBUG_LEVEL=2")
end
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("linux") then
local gtk = package:dep("gtk+3"):fetch()
if gtk then
local includedirs = gtk.includedirs or gtk.sysincludedirs
if includedirs then
table.insert(configs, "-DGTK3_INCLUDE_DIRS=" .. table.concat(table.wrap(includedirs), ";"))
end
local links = gtk.links
if links then
table.insert(configs, "-DGTK3_LIBRARIES=" .. table.concat(table.wrap(links), ";"))
end
end
end
import("package.tools.cmake").install(package, configs)
local version = package:version()
local subdir = "wx-" .. version:major() .. "." .. version:minor()

Loading…
Cancel
Save