| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>xmake</title>
- <link rel="icon" href="/assets/img/favicon.ico">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <meta name="description" content="Description">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <link href="/assets/npm/github-markdown/github-markdown.min.css" rel="stylesheet">
- <style>
- .markdown-body {
- box-sizing: border-box;
- min-width: 200px;
- max-width: 980px;
- margin: 0 auto;
- padding: 45px;
- }
- @media (max-width: 767px) {
- .markdown-body {
- padding: 15px;
- }
- }
- </style>
- </head>
- <body>
- <article class="markdown-body">
- <h4>This is a mirror page, please see the original page: </h4><a href="https://xmake.io/#/getting_started">https://xmake.io/#/getting_started</a>
- <div id="wwads-panel" class="wwads-cn wwads-vertical wwads-sticky" data-id="239" style="max-width:180px;bottom:20px;right:20px;width:200px;height:260px;background:#fff;position:fixed"></div>
- </br>
- <script type="text/javascript" charset="UTF-8" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
- <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CE7I52QU&placement=xmakeio" id="_carbonads_js"></script>
- <style>
- #carbonads {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
- Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
- }
- #carbonads {
- display: flex;
- max-width: 330px;
- background-color: hsl(0, 0%, 98%);
- box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, .1);
- }
- #carbonads a {
- color: inherit;
- text-decoration: none;
- }
- #carbonads a:hover {
- color: inherit;
- }
- #carbonads span {
- position: relative;
- display: block;
- overflow: hidden;
- }
- #carbonads .carbon-wrap {
- display: flex;
- }
- .carbon-img {
- display: block;
- margin: 0;
- line-height: 1;
- }
- .carbon-img img {
- display: block;
- }
- .carbon-text {
- font-size: 13px;
- padding: 10px;
- line-height: 1.5;
- text-align: left;
- }
- .carbon-poweredby {
- display: block;
- padding: 8px 10px;
- background: repeating-linear-gradient(-45deg, transparent, transparent 5px, hsla(0, 0%, 0%, .025) 5px, hsla(0, 0%, 0%, .025) 10px) hsla(203, 11%, 95%, .4);
- text-align: center;
- text-transform: uppercase;
- letter-spacing: .5px;
- font-weight: 600;
- font-size: 9px;
- line-height: 1;
- }
- </style>
- <h2 id="supportingtheproject">Supporting the project</h2>
- <p>Support this project by becoming a sponsor. Your logo will show up here with a link to your website. 🙏</p>
- <ul>
- <li><a href="https://xmake.io/#/about/sponsor">Become a sponsor</a></li>
- </ul>
- <p><a href="https://opencollective.com/xmake#sponsors" target="_blank"><img src="https://opencollective.com/xmake/sponsors.svg?width=890"></a></p>
- <h2 id="introduction">Introduction</h2>
- <p>xmake is a lightweight cross-platform build utility based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more concise and intuitive. It is very friendly to novices and can quickly get started in a short time. Let users focus more on actual project development.</p>
- <p>It can compile the project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.</p>
- <pre><code>Xmake = Build backend + Project Generator + Package Manager
- </code></pre><p>If you want to know more, please refer to: <a href="https://xmake.io/#/getting_started">Documents</a>, <a href="https://github.com/xmake-io/xmake">Github</a> and <a href="https://gitee.com/tboox/xmake">Gitee</a> and also welcome to join our <a href="https://xmake.io/#/about/contact">community</a>.</p>
- <p><img src="https://xmake.io/assets/img/index/xmake-basic-render.gif" alt=""></p>
- <h2 id="installation">Installation</h2>
- <h4 id="viacurl">via curl</h4>
- <pre><code class="lang-bash">curl -fsSL https://xmake.io/shget.text | bash
- </code></pre>
- <h4 id="viawget">via wget</h4>
- <pre><code class="lang-bash">wget https://xmake.io/shget.text -O - | bash
- </code></pre>
- <h4 id="viapowershell">via powershell</h4>
- <pre><code class="lang-powershell">Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
- </code></pre>
- <h4 id="otherinstallationways">Other installation ways</h4>
- <p>If you don't want to use script to install xmake, you can also click <a href="https://xmake.io/#/guide/installation">Installation Guide</a> to get other installation ways.</p>
- <h2 id="simpledescription">Simple description</h2>
- <pre><code class="lang-lua">target("hello")
- set_kind("binary")
- add_files("src/*.cpp")
- </code></pre>
- <h2 id="packagedependences">Package dependences</h2>
- <pre><code class="lang-lua">add_requires("tbox 1.6.*", "zlib", "libpng ~1.6")
- </code></pre>
- <p>An official xmake package repository: <a href="https://github.com/xmake-io/xmake-repo">xmake-repo</a></p>
- <h2 id="buildproject">Build project</h2>
- <pre><code class="lang-bash">$ xmake
- </code></pre>
- <h2 id="runtarget">Run target</h2>
- <pre><code class="lang-bash">$ xmake run console
- </code></pre>
- <h2 id="debugtarget">Debug target</h2>
- <pre><code class="lang-bash">$ xmake run -d console
- </code></pre>
- <h2 id="configureplatform">Configure platform</h2>
- <pre><code class="lang-bash">$ xmake f -p [windows|linux|macosx|android|iphoneos ..] -a [x86|arm64 ..] -m [debug|release]
- $ xmake
- </code></pre>
- <h2 id="menuconfiguration">Menu configuration</h2>
- <pre><code class="lang-bash">$ xmake f --menu
- </code></pre>
- <p><img src="https://xmake.io/assets/img/index/menuconf.png" width="650px" /></p>
- <h2 id="buildasfastasninja">Build as fast as ninja</h2>
- <p>The test project: <a href="https://github.com/xmake-io/xmake/tree/master/core">xmake-core</a></p>
- <h3 id="multitaskparallelcompilation">Multi-task parallel compilation</h3>
- <table>
- <thead>
- <tr>
- <th>buildsystem</th>
- <th>Termux (8core/-j12)</th>
- <th>buildsystem</th>
- <th>MacOS (8core/-j12)</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>xmake</td>
- <td>24.890s</td>
- <td>xmake</td>
- <td>12.264s</td>
- </tr>
- <tr>
- <td>ninja</td>
- <td>25.682s</td>
- <td>ninja</td>
- <td>11.327s</td>
- </tr>
- <tr>
- <td>cmake(gen+make)</td>
- <td>5.416s+28.473s</td>
- <td>cmake(gen+make)</td>
- <td>1.203s+14.030s</td>
- </tr>
- <tr>
- <td>cmake(gen+ninja)</td>
- <td>4.458s+24.842s</td>
- <td>cmake(gen+ninja)</td>
- <td>0.988s+11.644s</td>
- </tr>
- </tbody>
- </table>
- <h3 id="singletaskcompilation">Single task compilation</h3>
- <table>
- <thead>
- <tr>
- <th>buildsystem</th>
- <th>Termux (-j1)</th>
- <th>buildsystem</th>
- <th>MacOS (-j1)</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>xmake</td>
- <td>1m57.707s</td>
- <td>xmake</td>
- <td>39.937s</td>
- </tr>
- <tr>
- <td>ninja</td>
- <td>1m52.845s</td>
- <td>ninja</td>
- <td>38.995s</td>
- </tr>
- <tr>
- <td>cmake(gen+make)</td>
- <td>5.416s+2m10.539s</td>
- <td>cmake(gen+make)</td>
- <td>1.203s+41.737s</td>
- </tr>
- <tr>
- <td>cmake(gen+ninja)</td>
- <td>4.458s+1m54.868s</td>
- <td>cmake(gen+ninja)</td>
- <td>0.988s+38.022s</td>
- </tr>
- </tbody>
- </table>
- <h2 id="packagemanagement">Package management</h2>
- <h3 id="downloadandbuild">Download and build</h3>
- <p><img src="https://xmake.io/assets/img/index/package_manage.png" width="650px" /></p>
- <h3 id="processingarchitecture">Processing architecture</h3>
- <p><img src="https://xmake.io/assets/img/index/package_arch.png" width="650px" /></p>
- <h3 id="supportedpackagerepositories">Supported package repositories</h3>
- <ul>
- <li>Official package repository <a href="https://github.com/xmake-io/xmake-repo">xmake-repo</a> (tbox >1.6.1)</li>
- <li>Official package manager <a href="https://github.com/xmake-io/xrepo">Xrepo</a></li>
- <li><a href="https://xmake.io/#/package/remote_package?id=using-self-built-private-package-repository">User-built repositories</a></li>
- <li>Conan (conan::openssl/1.1.1g)</li>
- <li>Conda (conda::libpng 1.3.67)</li>
- <li>Vcpkg (vcpkg:ffmpeg)</li>
- <li>Homebrew/Linuxbrew (brew::pcre2/libpcre2-8)</li>
- <li>Pacman on archlinux/msys2 (pacman::libcurl)</li>
- <li>Apt on ubuntu/debian (apt::zlib1g-dev)</li>
- <li>Clib (clib::<a href="mailto:clibs/[email protected]">clibs/[email protected]</a>)</li>
- <li>Dub (dub::log 0.4.3)</li>
- <li>Portage on Gentoo/Linux (portage::libhandy)</li>
- <li>Nimble for nimlang (nimble::zip >1.3)</li>
- </ul>
- <h3 id="packagemanagementfeatures">Package management features</h3>
- <ul>
- <li>The official repository provides nearly 500+ packages, one-click compilation on all platforms</li>
- <li>Full platform package support, support for cross-compiled dependent package integration</li>
- <li>Support package virtual environment, <code>xrepo env shell</code></li>
- <li>Precompiled package acceleration for windows</li>
- <li>Support self-built package repositories, private repository deployment</li>
- <li>Third-party package repository support, such as: vcpkg, conan, conda, etc.</li>
- <li>Support to pull using remote toolchain automatically</li>
- <li>Support to lock package dependency</li>
- </ul>
- <h2 id="supportedplatforms">Supported platforms</h2>
- <ul>
- <li>Windows (x86, x64)</li>
- <li>macOS (i386, x86_64, arm64)</li>
- <li>Linux (i386, x86_64, cross-toolchains ..)</li>
- <li>*BSD (i386, x86_64)</li>
- <li>Android (x86, x86_64, armeabi, armeabi-v7a, arm64-v8a)</li>
- <li>iOS (armv7, armv7s, arm64, i386, x86_64)</li>
- <li>WatchOS (armv7k, i386)</li>
- <li>AppleTVOS (armv7, arm64, i386, x86_64)</li>
- <li>MSYS (i386, x86_64)</li>
- <li>MinGW (i386, x86_64, arm, arm64)</li>
- <li>Cygwin (i386, x86_64)</li>
- <li>Wasm (wasm32)</li>
- <li>Cross (cross-toolchains ..)</li>
- </ul>
- <h2 id="supportedtoolchains">Supported toolchains</h2>
- <pre><code class="lang-bash">$ xmake show -l toolchains
- xcode Xcode IDE
- vs VisualStudio IDE
- yasm The Yasm Modular Assembler
- clang A C language family frontend for LLVM
- go Go Programming Language Compiler
- dlang D Programming Language Compiler
- gfortran GNU Fortran Programming Language Compiler
- zig Zig Programming Language Compiler
- sdcc Small Device C Compiler
- cuda CUDA Toolkit
- ndk Android NDK
- rust Rust Programming Language Compiler
- llvm A collection of modular and reusable compiler and toolchain technologies
- cross Common cross compilation toolchain
- nasm NASM Assembler
- gcc GNU Compiler Collection
- mingw Minimalist GNU for Windows
- gnu-rm GNU Arm Embedded Toolchain
- envs Environment variables toolchain
- fasm Flat Assembler
- tinycc Tiny C Compiler
- emcc A toolchain for compiling to asm.js and WebAssembly
- icc Intel C/C++ Compiler
- ifort Intel Fortran Compiler
- muslcc The musl-based cross-compilation toolchain
- fpc Free Pascal Programming Language Compiler
- wasi WASI-enabled WebAssembly C/C++ toolchain
- nim Nim Programming Language Compiler
- circle A new C++20 compiler
- armcc ARM Compiler Version 5 of Keil MDK
- armclang ARM Compiler Version 6 of Keil MDK
- </code></pre>
- <h2 id="supportedlanguages">Supported Languages</h2>
- <ul>
- <li>C</li>
- <li>C++</li>
- <li>Objective-C and Objective-C++</li>
- <li>Swift</li>
- <li>Assembly</li>
- <li>Golang</li>
- <li>Rust</li>
- <li>Dlang</li>
- <li>Fortran</li>
- <li>Cuda</li>
- <li>Zig</li>
- <li>Vala</li>
- <li>Pascal</li>
- <li>Nim</li>
- </ul>
- <h2 id="supportedfeatures">Supported Features</h2>
- <ul>
- <li>The configuration grammar is simple and easy to use</li>
- <li>Quick installation, without any dependencies</li>
- <li>One-click compilation for all platforms</li>
- <li>Support cross compilation, intelligent analysis of cross tool chain information</li>
- <li>Extremely fast, multi-task parallel compilation support</li>
- <li>C++20 Module support</li>
- <li>Support cross-platform C/C++ dependency package quick integration, built-in package manager</li>
- <li>Multi-language mixed compilation support</li>
- <li>Rich plug-in support, providing various project generators, such as: vs/makefile/cmakelists/compile_commands to generate plugins</li>
- <li>REPL interactive execution support</li>
- <li>Incremental compilation support, automatic analysis of header files</li>
- <li>Quick switching and customization support of tool chain</li>
- <li>A large number of expansion modules support</li>
- </ul>
- <h2 id="supportedprojects">Supported Projects</h2>
- <ul>
- <li>Static Library</li>
- <li>Shared Library</li>
- <li>Console</li>
- <li>Cuda Program</li>
- <li>Qt Application</li>
- <li>WDK Driver (umdf/kmdf/wdm)</li>
- <li>WinSDK Application</li>
- <li>MFC Application</li>
- <li>iOS/MacOS Application (Support .metal)</li>
- <li>Framework and Bundle Program (iOS/MacOS)</li>
- <li>SWIG Modules (Lua, python, ...)</li>
- <li>Luarocks Modules</li>
- <li>Protobuf Program</li>
- <li>Lex/yacc program</li>
- <li>C++20 Modules</li>
- </ul>
- <h2 id="moreexamples">More Examples</h2>
- <h4 id="debugandreleasemodes">Debug and release modes</h4>
- <pre><code class="lang-lua">add_rules("mode.debug", "mode.release")
- target("console")
- set_kind("binary")
- add_files("src/*.c")
- if is_mode("debug") then
- add_defines("DEBUG")
- end
- </code></pre>
- <h4 id="customscripts">Custom scripts</h4>
- <pre><code class="lang-lua">target("test")
- set_kind("binary")
- add_files("src/*.c")
- after_build(function (target)
- print("hello: %s", target:name())
- os.exec("echo %s", target:targetfile())
- end)
- </code></pre>
- <h4 id="automaticintegrationofdependentpackages">Automatic integration of dependent packages</h4>
- <p>Download and use packages in <a href="https://github.com/xmake-io/xmake-repo">xmake-repo</a> or third-party repositories:</p>
- <pre><code class="lang-lua">add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8")
- add_requires("conan::openssl/1.1.1g", {alias = "openssl", optional = true, debug = true})
- target("test")
- set_kind("binary")
- add_files("src/*.c")
- add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
- </code></pre>
- <p>In addition, we can also use the <a href="https://github.com/xmake-io/xrepo">xrepo</a> command to quickly install dependent packages.</p>
- <h4 id="qtquickappprogram">Qt QuickApp Program</h4>
- <pre><code class="lang-lua">target("test")
- add_rules("qt.quickapp")
- add_files("src/*.cpp")
- add_files("src/qml.qrc")
- </code></pre>
- <h4 id="cudaprogram">Cuda Program</h4>
- <pre><code class="lang-lua">target("test")
- set_kind("binary")
- add_files("src/*.cu")
- add_cugencodes("native")
- add_cugencodes("compute_35")
- </code></pre>
- <h4 id="wdkumdfdriverprogram">WDK/UMDF Driver Program</h4>
- <pre><code class="lang-lua">target("echo")
- add_rules("wdk.driver", "wdk.env.umdf")
- add_files("driver/*.c")
- add_files("driver/*.inx")
- add_includedirs("exe")
- target("app")
- add_rules("wdk.binary", "wdk.env.umdf")
- add_files("exe/*.cpp")
- </code></pre>
- <p>More wdk driver program examples (umdf/kmdf/wdm), please see <a href="https://xmake.io/#/guide/project_examples?id=wdk-driver-program">WDK Program Examples</a></p>
- <h4 id="iosmacosapplication">iOS/MacOS Application</h4>
- <pre><code class="lang-lua">target("test")
- add_rules("xcode.application")
- add_files("src/*.m", "src/**.storyboard", "src/*.xcassets")
- add_files("src/Info.plist")
- </code></pre>
- <h4 id="frameworkandbundleprogramiosmacos">Framework and Bundle Program (iOS/MacOS)</h4>
- <pre><code class="lang-lua">target("test")
- add_rules("xcode.framework") -- or xcode.bundle
- add_files("src/*.m")
- add_files("src/Info.plist")
- </code></pre>
- <h4 id="openmpprogram">OpenMP Program</h4>
- <pre><code class="lang-lua">add_requires("openmp")
- target("loop")
- set_kind("binary")
- add_files("src/*.cpp")
- add_packages("openmp")
- </code></pre>
- <h4 id="zigprogram">Zig Program</h4>
- <pre><code class="lang-lua">target("test")
- set_kind("binary")
- add_files("src/main.zig")
- </code></pre>
- <h3 id="automaticallyfetchremotetoolchain">Automatically fetch remote toolchain</h3>
- <h4 id="fetchthespecialversionofllvm">fetch the special version of llvm</h4>
- <p>We use clang in llvm-10 to compile the project.</p>
- <pre><code class="lang-lua">add_requires("llvm 10.x", {alias = "llvm-10"})
- target("test")
- set_kind("binary")
- add_files("src/*.c)
- set_toolchains("llvm@llvm-10")
- </code></pre>
- <h4 id="fetchcrosscompilationtoolchain">Fetch cross-compilation toolchain</h4>
- <p>We can also pull the specified cross-compilation tool chain to compile the project.</p>
- <pre><code class="lang-lua">add_requires("muslcc")
- target("test")
- set_kind("binary")
- add_files("src/*.c)
- set_toolchains("@muslcc")
- </code></pre>
- <h4 id="fetchtoolchainandpackages">Fetch toolchain and packages</h4>
- <p>We can also use the specified muslcc cross-compilation toolchain to compile and integrate all dependent packages</p>
- <pre><code class="lang-lua">add_requires("muslcc")
- add_requires("zlib", "libogg", {system = false})
- set_toolchains("@muslcc")
- target("test")
- set_kind("binary")
- add_files("src/*.c")
- add_packages("zlib", "libogg")
- </code></pre>
- <h2 id="plugins">Plugins</h2>
- <h4 id="generateideprojectfilepluginmakefilevs2002vs2019">Generate IDE project file plugin(makefile, vs2002 - vs2019 .. )</h4>
- <pre><code class="lang-bash">$ xmake project -k vsxmake -m "debug;release" # New vsproj generator (Recommended)
- $ xmake project -k vs -m "debug;release"
- $ xmake project -k cmake
- $ xmake project -k ninja
- $ xmake project -k compile_commands
- </code></pre>
- <h4 id="runthecustomluascriptplugin">Run the custom lua script plugin</h4>
- <pre><code class="lang-bash">$ xmake l ./test.lua
- $ xmake l -c "print('hello xmake!')"
- $ xmake l lib.detect.find_tool gcc
- $ xmake l
- > print("hello xmake!")
- > {1, 2, 3}
- < {
- 1,
- 2,
- 3
- }
- </code></pre>
- <p>More builtin plugins, please see: <a href="https://xmake.io/#/plugin/builtin_plugins">Builtin plugins</a></p>
- <p>Please download and install more other plugins from the plugins repository <a href="https://github.com/xmake-io/xmake-plugins">xmake-plugins</a>.</p>
- <h2 id="ideeditorintegration">IDE/Editor Integration</h2>
- <ul>
- <li><a href="https://github.com/xmake-io/xmake-vscode">xmake-vscode</a></li>
- </ul>
- <p><img src="https://raw.githubusercontent.com/xmake-io/xmake-vscode/master/res/problem.gif" width="650px" /></p>
- <ul>
- <li><a href="https://github.com/xmake-io/xmake-sublime">xmake-sublime</a></li>
- </ul>
- <p><img src="https://raw.githubusercontent.com/xmake-io/xmake-sublime/master/res/problem.gif" width="650px" /></p>
- <ul>
- <li><a href="https://github.com/xmake-io/xmake-idea">xmake-idea</a></li>
- </ul>
- <p><img src="https://raw.githubusercontent.com/xmake-io/xmake-idea/master/res/problem.gif" width="650px" /></p>
- <ul>
- <li><a href="https://github.com/Mythos-404/xmake.nvim">xmake.nvim</a> (third-party, thanks <a href="https://github.com/Mythos-404">@Mythos_404</a>)</li>
- </ul>
- <p><img src="https://raw.githubusercontent.com/Mythos-404/xmake.nvim/main/assets/XmakePreview.gif" width="650px" /></p>
- <ul>
- <li><p><a href="https://github.com/luzhlon/xmake.vim">xmake.vim</a> (third-party, thanks <a href="https://github.com/luzhlon">@luzhlon</a>)</p>
- </li>
- <li><p><a href="https://github.com/HelloWorld886/xmake-visualstudio">xmake-visualstudio</a> (third-party, thanks <a href="https://github.com/HelloWorld886">@HelloWorld886</a>)</p>
- </li>
- <li><p><a href="https://github.com/Arthapz/xmake-project-manager">xmake-qtcreator</a> (third-party, thanks <a href="https://github.com/Arthapz">@Arthapz</a>)</p>
- </li>
- </ul>
- <h3 id="xmakegradlepluginjni">XMake Gradle Plugin (JNI)</h3>
- <p>We can uses <a href="https://github.com/xmake-io/xmake-gradle">xmake-gradle</a> plugin to compile JNI library in gradle.</p>
- <pre><code>plugins {
- id 'org.tboox.gradle-xmake-plugin' version '1.1.4'
- }
- android {
- externalNativeBuild {
- xmake {
- path "jni/xmake.lua"
- }
- }
- }
- </code></pre><p>The <code>xmakeBuild</code> will be injected to <code>assemble</code> task automatically if the gradle-xmake-plugin has been applied.</p>
- <pre><code class="lang-console">$ ./gradlew app:assembleDebug
- > Task :nativelib:xmakeConfigureForArm64
- > Task :nativelib:xmakeBuildForArm64
- >> xmake build
- [ 50%]: cache compiling.debug nativelib.cc
- [ 75%]: linking.debug libnativelib.so
- [100%]: build ok!
- >> install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a
- > Task :nativelib:xmakeConfigureForArmv7
- > Task :nativelib:xmakeBuildForArmv7
- >> xmake build
- [ 50%]: cache compiling.debug nativelib.cc
- [ 75%]: linking.debug libnativelib.so
- [100%]: build ok!
- >> install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a
- > Task :nativelib:preBuild
- > Task :nativelib:assemble
- > Task :app:assembleDebug
- </code></pre>
- <h2 id="technicalsupport">Technical Support</h2>
- <p>We also provide paid technical support to help users quickly solve related problems. For details, please click the image link below:</p>
- <p><a href="https://xscode.com/waruqi/xmake"><br><img src="https://tboox.org/assets/img/xmake-xscode.png" width="650px" /><br></a></p>
- <p>Or you can also consider sponsoring us to get technical support services, [<a href="https://xmake.io/#/about/sponsor">Become a sponsor</a>]</p>
- <h2 id="whoisusingxmake">Who is using Xmake?</h2>
- <p>Please click <a href="https://xmake.io/#/about/who_is_using_xmake">User List</a> to view the complete user list.</p>
- <p>If you are using xmake, welcome to submit the information to the above list through PR, so that let more users can known how many users are using xmake.</p>
- <p>Ihis also let users to use xmake more confidently, and we will also have more motivation to maintain it continuously,<br>so that the xmake project and the community will grow stronger.</p>
- <h2 id="contacts">Contacts</h2>
- <ul>
- <li>Email:<a href="mailto:[email protected]">[email protected]</a></li>
- <li>Homepage:<a href="https://xmake.io">xmake.io</a></li>
- <li>Community<ul>
- <li><a href="https://www.reddit.com/r/xmake/">Chat on reddit</a></li>
- <li><a href="https://t.me/tbooxorg">Chat on telegram</a></li>
- <li><a href="https://discord.gg/xmake">Chat on discord</a></li>
- <li>Chat on QQ Group: 343118190, 662147501</li>
- </ul>
- </li>
- <li>Source Code:<a href="https://github.com/xmake-io/xmake">Github</a>, <a href="https://gitee.com/tboox/xmake">Gitee</a></li>
- <li>Wechat Public: tboox-os</li>
- </ul>
- <h2 id="thanks">Thanks</h2>
- <p>This project exists thanks to all the people who have <a href="CONTRIBUTING.md">contributed</a>:<br><a href="https://github.com/xmake-io/xmake/graphs/contributors"><img src="https://opencollective.com/xmake/contributors.svg?width=890&button=false" /></a></p>
- <ul>
- <li><a href="https://github.com/TitanSnow">TitanSnow</a>: provide the xmake <a href="https://github.com/TitanSnow/ts-xmake-logo">logo</a> and install scripts</li>
- <li><a href="https://github.com/uael">uael</a>: provide the semantic versioning library <a href="https://github.com/uael/sv">sv</a></li>
- <li><a href="https://github.com/OpportunityLiu">OpportunityLiu</a>: improve cuda, tests and ci</li>
- <li><a href="https://github.com/xq114">xq144</a>: Improve <code>xrepo env shell</code>, and contribute a lot of packages to the <a href="https://github.com/xmake-io/xmake-repo">xmake-repo</a> repository.</li>
- </ul>
- </article>
- </body>
- </html>
|