add qwindowkit (#3892)
* add qwindowkit * add deps * add qt6gui to qwindowkit * update qtbase * fix arch * use 1.1 version * use submodules * add logs * fix test * fix qmsetup * remove dir * fix qmsetup --------- Co-authored-by: star9029 <hengxings783@gmail.com>pull/3927/head
parent
8be441e1b3
commit
f8f29a122b
3 changed files with 97 additions and 3 deletions
@ -0,0 +1,21 @@ |
||||
package("qmsetup") |
||||
set_homepage("https://github.com/stdware/qmsetup") |
||||
set_description("CMake Modules and Basic Libraries for C/C++ projects.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/stdware/qmsetup.git") |
||||
add_versions("2024.04.23", "0b95afa778b99d9e9de772006555309b74ed32f4") |
||||
|
||||
add_deps("cmake") |
||||
|
||||
on_install(function (package) |
||||
local configs = {} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
package:addenv("PATH", "bin") |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cxxincludes("qmsetup/qmsetup_global.h")) |
||||
end) |
@ -0,0 +1,41 @@ |
||||
package("qwindowkit") |
||||
set_homepage("https://github.com/stdware/qwindowkit") |
||||
set_description("Cross-platform frameless window framework for Qt. Support Windows, macOS, Linux.") |
||||
set_license("Apache-2.0") |
||||
|
||||
add_urls("https://github.com/stdware/qwindowkit/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/stdware/qwindowkit.git") |
||||
|
||||
add_versions("1.1", "a0102ee4c4fdd08ce35c29a5b9a27384005028b2ab6094f61e467c35917b8c5e") |
||||
|
||||
add_deps("cmake") |
||||
add_deps("qmsetup") |
||||
add_deps("qt6gui") |
||||
if is_plat("linux") then |
||||
add_deps("fontconfig", "libxkbcommon") |
||||
end |
||||
|
||||
add_includedirs("include/QWindowKit") |
||||
|
||||
on_install("windows|x64", "linux|x86_64", "macosx|x86_64", function (package) |
||||
local configs = {} |
||||
table.insert(configs, "-Dqmsetup_DIR=" .. package:dep("qmsetup"):installdir("lib")) |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
local cxflags |
||||
if package:is_plat("windows") then |
||||
cxflags = {"/Zc:__cplusplus", "/permissive-"} |
||||
else |
||||
cxflags = "-fPIC" |
||||
end |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <QWKWidgets/widgetwindowagent.h> |
||||
void test() { |
||||
QWK::WidgetWindowAgent(nullptr); |
||||
} |
||||
]]}, {configs = {languages = "c++17", cxflags = cxflags}})) |
||||
end) |
Loading…
Reference in new issue