|
@@ -6,6 +6,7 @@ package("unicorn")
|
|
|
add_urls("https://github.com/unicorn-engine/unicorn/archive/refs/tags/$(version).tar.gz",
|
|
|
"https://github.com/unicorn-engine/unicorn.git")
|
|
|
|
|
|
+ add_versions("2.1.3", "5572eecd903fff0e66694310ca438531243b18782ce331a4262eeb6f6ad675bc")
|
|
|
add_versions("2.1.1", "8740b03053162c1ace651364c4c5e31859eeb6c522859aa00cb4c31fa9cbbed2")
|
|
|
|
|
|
add_deps("cmake")
|
|
@@ -38,19 +39,16 @@ package("unicorn")
|
|
|
table.insert(configs, "-DUNICORN_ARCH=" .. archs)
|
|
|
import("package.tools.cmake").install(package, configs)
|
|
|
|
|
|
+ -- Do not install .o file into lib folder or it would fail to link against it
|
|
|
+ os.rm(package:installdir("lib/*.o"))
|
|
|
+ os.rm(package:installdir("lib/*.obj"))
|
|
|
if package:config("shared") then
|
|
|
os.tryrm(package:installdir("lib/unicorn.lib"))
|
|
|
os.rm(package:installdir("lib/*.a"))
|
|
|
end
|
|
|
|
|
|
- if package:is_plat("windows") then
|
|
|
- if package:config("shared") then
|
|
|
- io.replace(package:installdir("include/unicorn/unicorn.h"), "__declspec(dllexport)", "__declspec(dllimport)", {plain = true})
|
|
|
- end
|
|
|
- if package:is_debug() then
|
|
|
- local dir = package:installdir(package:config("shared") and "bin" or "lib")
|
|
|
- os.trycp(path.join(package:buildir(), "unicorn.pdb"), dir)
|
|
|
- end
|
|
|
+ if package:is_plat("windows") and package:config("shared") then
|
|
|
+ io.replace(package:installdir("include/unicorn/unicorn.h"), "__declspec(dllexport)", "__declspec(dllimport)", {plain = true})
|
|
|
end
|
|
|
end)
|
|
|
|