HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

xmake — A cross-platform C & C++ build utility based on Lua. More information: <https://xmake.io/#/getting_s

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandbuildxmakeclicrossplatformbasedutility

Problem

How to use the xmake command: A cross-platform C & C++ build utility based on Lua. More information: <https://xmake.io/#/getting_started>.

Solution

xmake — A cross-platform C & C++ build utility based on Lua. More information: <https://xmake.io/#/getting_started>.

Create an Xmake C project, consisting of a hello world and xmake.lua:
xmake create {{[-l|--language]}} {{[c|clean]}} {{[-P|--project]}} {{project_name}}


Build and run an Xmake project:
xmake {{[b|build]}} {{[r|run]}}


Run a compiled Xmake target directly:
xmake {{[r|run]}} {{target_name}}


Configure a project's build targets:
xmake {{[f|config]}} {{[-p |--plat=]}}{{macosx|linux|iphoneos|...}} {{[-a |--arch=]}}{{x86_64|i386|arm64|...}} {{[-m |--mode=]}}{{debug|release}}


Install the compiled target to a directory:
xmake {{[i|install]}} {{[-o |--installdir=]}}{{path/to/directory}}

Code Snippets

Create an Xmake C project, consisting of a hello world and `xmake.lua`

xmake create {{[-l|--language]}} {{[c|clean]}} {{[-P|--project]}} {{project_name}}

Build and run an Xmake project

xmake {{[b|build]}} {{[r|run]}}

Run a compiled Xmake target directly

xmake {{[r|run]}} {{target_name}}

Configure a project's build targets

xmake {{[f|config]}} {{[-p |--plat=]}}{{macosx|linux|iphoneos|...}} {{[-a |--arch=]}}{{x86_64|i386|arm64|...}} {{[-m |--mode=]}}{{debug|release}}

Install the compiled target to a directory

xmake {{[i|install]}} {{[-o |--installdir=]}}{{path/to/directory}}

Context

tldr-pages: common/xmake

Revisions (0)

No revisions yet.