find_package
This interface refers to the design of CMake for the find_* interfaces, which finds and adds package dependencies in the project target.
lua
target("test")
set_kind("binary")
add_files("*.c")
on_load(function (target)
import("lib.detect.find_package")
target:add(find_package("继续阅读 »
xmake provides some api, which can detect whether exist some library functions.
```lua
target("test")
-- checks some libc functions from the header files: wchar.h and stdlib.h
add_cfuncs("libc", nil, {"wchar.h", "stdlib.h"}, "wcscat",
继续阅读 »
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:
bash
$ xmake
And it will not re-generate configuration if the project description has not changed.
But we can also modify configuration manual继续阅读 »
We recently added a new feature for xmake:
you need not write any make-like file (xmake.lua, makefile.am, cmakelist.txt, etc.) and also build it directly.
It will scan all source files and generate xmake.lua automatically for building project.
And xmake will detect 'main' function in source file in order to distin继续阅读 »