How to configure for compiling
原文链接 https://waruqi.github.io/2016/07/19/config-description/
注:以下为加速网络访问所做的原文缓存,经过重新格式化,可能存在格式方面的问题,或偶有遗漏信息,请以原文为准。
xmake will automatically detect the system environment and create the most appropriate configuration to compile project when building a program
Usually we only need to run:
$ xmake
And it will not re-generate configuration if the project description has not changed.
But we can also modify configuration manually.
e.g
We want to build android program on macosx:
$ xmake f -p android --ndk=~/file/android-ndk
Or
$ xmake config --plat=android --ndk=~/file/android-ndk
Next we build it.
$ xmake
We need add argument -c
to clear the cached configuration and recheck it when some caching problem occurs
$ xmake f -c
The project configuration was storaged in the following directory:
projectdir/.xmake
We can also use the global configuration to simplify our works.
.e.g
$ xmake global --ndk=~/file/android-ndk
Or
$ xmake g --ndk=~/file/android-ndk
Now we only run the following command to build project without the ndk argument each time. : )
$ xmake f -p android
$ xmake
Lastly,we can run xmake with --help
to know more argument usages.
$ xmake f -h
$ xmake g -h