-
Hi! I'm very glad to use Xmake and it's great, thank you for your work ! However, I am struggling to create a Xmake package from a small library managed with Cmake : https://github.com/svperbeast/struct. Here is my lua script : package("struct")
set_description("pack and unpack binary data.")
set_license("MIT-License")
set_homepage("https://github.com/svperbeast/struct")
--add_urls("https://github.com/svperbeast/struct.git")
add_deps("cmake")
set_sourcedir(path.join(os.scriptdir(), "struct"))
on_install(function (package)
import("package.tools.cmake").install(package, {"-DSTRUCT_BUILD_TEST=OFF"})
end)
on_test(function (package)
assert(package:has_cfuncs("struct_pack", {includes = "struct.h"}))
assert(package:has_cfuncs("struct_unpack", {includes = "struct/struct.h"}))
end)
package_end() When I run xmake I have the following problem : I noticed that I get the correct library and header files in : Thanks for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The cmakelists of this project are not well implemented cmake install, but you can copy them yourself to package:installdir("include") import("package.tools.cmake").build(package, configs, {buildir = "build"})
os.cp("build/release/lib", package:installdir())
os.cp("build/release/include", package:installdir()) |
Beta Was this translation helpful? Give feedback.
The cmakelists of this project are not well implemented cmake install, but you can copy them yourself to package:installdir("include")