2024-07-04 14:14:05 -07:00
|
|
|
# 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`:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`xmake create {{[-l|--language]}} {{[c|clean]}} {{[-P|--project]}} {{project_name}}`
|
2024-07-04 14:14:05 -07:00
|
|
|
|
|
|
|
- Build and run an Xmake project:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`xmake {{[b|build]}} {{[r|run]}}`
|
2024-07-04 14:14:05 -07:00
|
|
|
|
|
|
|
- Run a compiled Xmake target directly:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`xmake {{[r|run]}} {{target_name}}`
|
2024-07-04 14:14:05 -07:00
|
|
|
|
|
|
|
- Configure a project's build targets:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`xmake {{[f|config]}} {{[-p |--plat=]}}{{macosx|linux|iphoneos|...}} {{[-a |--arch=]}}{{x86_64|i386|arm64|...}} {{[-m |--mode=]}}{{debug|release}}`
|
2024-07-04 14:14:05 -07:00
|
|
|
|
|
|
|
- Install the compiled target to a directory:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`xmake {{[i|install]}} {{[-o |--installdir=]}}{{path/to/directory}}`
|