-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add duilib_ultimate * Update xmake.lua * Update xmake.lua * Update xmake.lua * port xmake --------- Co-authored-by: heheda123123 <[email protected]> Co-authored-by: star9029 <[email protected]>
- Loading branch information
1 parent
4516e5b
commit 4ecc1b2
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
option("unicode", {default = true}) | ||
|
||
add_rules("mode.debug", "mode.release") | ||
|
||
set_languages("c++11") | ||
|
||
target("DuiLib") | ||
set_kind("$(kind)") | ||
add_files("DuiLib/**.cpp|DuiLib/StdAfx.cpp") | ||
add_includedirs("DuiLib") | ||
set_pcxxheader("DuiLib/StdAfx.h") | ||
|
||
if is_kind("shared") then | ||
add_defines("UILIB_EXPORTS") | ||
elseif is_kind("static") then | ||
add_defines("UILIB_STATIC", {public = true}) | ||
end | ||
|
||
if has_config("unicode") then | ||
add_defines("UNICODE", "_UNICODE", {public = true}) | ||
end | ||
|
||
if is_plat("windows") then | ||
add_syslinks("gdi32", "comctl32", "imm32", "uuid", "winmm") | ||
end | ||
|
||
add_headerfiles("DuiLib/(**.h)") | ||
add_installfiles("DuiLib/Utils/Flash11.tlb", {prefixdir = "include/Utils"}) | ||
add_installfiles("DuiLib/Utils/flash11.tlh", {prefixdir = "include/Utils"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package("duilib_ultimate") | ||
set_homepage("https://github.com/qdtroy/DuiLib_Ultimate") | ||
set_description("DuiLib_Ultimate is the Optimized version for duilib library") | ||
set_license("MIT") | ||
|
||
add_urls("https://github.com/qdtroy/DuiLib_Ultimate/archive/refs/tags/$(version).tar.gz", | ||
"https://github.com/qdtroy/DuiLib_Ultimate.git") | ||
|
||
add_versions("0.3", "4a650267e98d8b19818bdeb7675dcf1403017732b961620678e1d2d81f81db91") | ||
|
||
add_configs("unicode", {description = "Enable Unicode support.", default = true, type = "boolean"}) | ||
|
||
add_syslinks("gdi32", "comctl32", "imm32", "uuid", "winmm") | ||
|
||
on_install("windows|!arm64", function (package) | ||
local configs = {unicode = package:config("unicode")} | ||
if not package:config("shared") then | ||
package:add("defines", "UILIB_STATIC") | ||
end | ||
if configs.unicode then | ||
package:add("defines", "UNICODE", "_UNICODE") | ||
end | ||
|
||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") | ||
import("package.tools.xmake").install(package, configs) | ||
os.cp("bin", package:installdir()) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:check_cxxsnippets({test = [[ | ||
#include "UIlib.h" | ||
using namespace DuiLib; | ||
void test() { | ||
CButtonUI *pButton = new CButtonUI(); | ||
} | ||
]]})) | ||
end) |