summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-02 00:56:35 +0800
committerruki <[email protected]>2021-01-02 00:56:35 +0800
commite61c1c15aacb34ebd1f5c11e271d2047febb9250 (patch)
tree3ede2cadb194f22d944c75030f53e265ead648d8 /tests/projects
parentf56db4a0eaf275f10cfb967f5dd5508fc3c9e37e (diff)
fix register packages
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/package/depconfigs/xmake.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/projects/package/depconfigs/xmake.lua b/tests/projects/package/depconfigs/xmake.lua
index 3f949375d..d366f06ce 100644
--- a/tests/projects/package/depconfigs/xmake.lua
+++ b/tests/projects/package/depconfigs/xmake.lua
@@ -10,14 +10,40 @@ target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("libpng")
+ before_build(function (target)
+ local found
+ for _, linkdir in ipairs(target:pkg("libpng"):get("linkdirs")) do
+ if linkdir:find("zlib/1.2.10", 1, true) then
+ found = true
+ end
+ end
+ assert(found, "package(zlib 1.2.10) not found!")
+ end)
target("test2")
set_kind("binary")
add_files("src/*.c")
add_packages("libtiff")
+ before_build(function (target)
+ local found
+ for _, linkdir in ipairs(target:pkg("libtiff"):get("linkdirs")) do
+ if linkdir:find("zlib", 1, true) then
+ found = true
+ end
+ end
+ assert(found, "package(zlib) not found!")
+ end)
target("test3")
set_kind("binary")
add_files("src/*.c")
add_packages("libwebp")
-
+ before_build(function (target)
+ local found
+ for _, linkdir in ipairs(target:pkg("libwebp"):get("linkdirs")) do
+ if linkdir:find("zlib", 1, true) then
+ found = true
+ end
+ end
+ assert(found, "package(zlib) not found!")
+ end)