-
-
Notifications
You must be signed in to change notification settings - Fork 851
Improve add_requires and find_package to integrate the 3rd package manager #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
31 tasks done
Labels
Milestone
Comments
ExamplesInstall and use the required conan packages. add_requires("CONAN::zlib/1.2.11@conan/stable", {alias = "zlib", debug = true})
add_requires("CONAN::OpenSSL/1.0.2n@conan/stable", {alias = "openssl",
configs = {options = "OpenSSL:shared=True"}})
target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("openssl", "zlib") Build project ruki:test_package ruki$ xmake
checking for the architecture ... x86_64
checking for the Xcode directory ... /Applications/Xcode.app
checking for the SDK version of Xcode ... 10.14
note: try installing these packages (pass -y to skip confirm)?
-> CONAN::zlib/1.2.11@conan/stable (debug)
-> CONAN::OpenSSL/1.0.2n@conan/stable
please input: y (y/n)
=> installing CONAN::zlib/1.2.11@conan/stable .. ok
=> installing CONAN::OpenSSL/1.0.2n@conan/stable .. ok
[ 0%]: ccache compiling.release src/main.c
[100%]: linking.release test |
ExampleUses find_packages. add_requires("CONAN::zlib/1.2.11@conan/stable", {alias = "zlib", debug = true})
add_requires("CONAN::OpenSSL/1.0.2n@conan/stable", {alias = "openssl",
configs = {options = "OpenSSL:shared=True"}})
target("test")
set_kind("binary")
add_files("src/*.c")
on_load(function (target)
target:add(find_packages("CONAN::OpenSSL/1.0.2n@conan/stable"))
target:add(find_packages("CONAN::zlib/1.2.11@conan/stable", {mode = "debug"}))
end) |
This was referenced Jan 29, 2019
We can also add the custom module to integrate with the 3rd package manager in projectdir/xmake.lua. We do not need to modify the xmake project source code.
add_moduledirs("modules")
add_requires("xxx::zlib", {alias = "zlib"})
target("test")
add_files("*.c")
add_packages("zlib") |
ExampleInstall and use brew packages add_requires("brew::zlib", {alias = "zlib"}})
add_requires("brew::pcre2/libpcre2-8", {alias = "pcre2"}})
target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("pcre2", "zlib") Install and use vcpkg packages add_requires("vcpkg::zlib", "vcpkg::pcre2")
target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("vcpkg::zlib", "vcpkg::pcre2") |
Closed
Add clib support #397 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Roadmap
add_requires("XXX::pkgname")
->package.manager.install_package("XXX::pkgname")
lib.detect.find_package("XXX::pkgname")
find_packages("XXX:pkgname", "zlib")
to find multiple packagesConan
settings = {"compiler=gcc", "compiler.version=4.9"}
build_requires = "xmake_generator/0.1.0@bincrafters/testing"
build = "all"
options = {"OpenSSL:shared=True"}
remote = "https://api.bintray.com/conan/bincrafters/public-conan"
Related issues
#327 Integrate with Conan package manager
#184 Improve lib.detect.find_package to support vcpkg
#69 Remote package management
#331 Creating xmake_generator for Conan
#330 Creating xmake_installer conan package
#332 Creating xmake "Build Helper" for Conan
The text was updated successfully, but these errors were encountered: