This version took more than four months to refactor and improve the package dependency management. The official repository added common packages such as mysql and ffmpeg, and added a lot of features.
string.serialize
and string.deserialize
to serialize and deserialize object, function and others.xmake g --menu
target:installdir()
and set_installdir()
api for targetadd_platformdirs
api, we can define custom platformsadd_installfiles
api to targetadd_requires
and find_package
to integrate the 3rd package managerfind_packages("pcre2", "zlib")
to find multiple packagesxmake project
pluginprivate, public, interface
to improve dependency inheritance like cmakepackage()
add_headerfiles
to improve to set header files and directoriesincludes()
, e.g. check_cfuncs
xmake update dev
on windowsxmake f/g --mingw=xxx
configuration option and improve to find_mingwoption.add_features
, option.add_cxxsnippets
and option.add_csnippets
add_option_xxx
lib.detect.find_package
lib.detect.find_package
and add builtin find_packages("zlib 1.x", "openssl", {xxx = ...})
apiset_modes()
as deprecated, we use add_rules("mode.debug", "mode.release")
instead of ittarget:set
, target:add
and add target:del
to modify target configurationqt_add_static_plugins()
api to support static Qt sdkThis version is mainly to improve the remote dependency package management, fix a lot of details, and this version can already support the upgrade from my upgrade through xmake update
, it will be more convenient to upgrade xmake later.
xmake plugin --help
add_syslinks
api to add system libraries dependencexmake l time xmake [--rebuild]
to record compilation timexmake f --vs_sdkver=10.0.15063.0
to change windows sdk versionlib.luajit.ffi
and lib.luajit.jit
extension modules-D
and --diagnosis
instead of --backtrace
add_packages("xxx", {links = {}})
LTUI is a cross-platform terminal ui library based on Lua.
This framework originated from the requirements of graphical menu configuration in xmake. Similar to the linux kernel’s menuconf to configure the compilation parameters, so using curses and lua to implement a cross-platform character terminal ui library.
Refer to kconfig-frontends for style rendering. Of course, users can customize different ui styles.
$ luarocks install ltui
We need install the cross-platform build utility xmake first.
$ xmake
Since my English is not very good, the article uses google translation, if you can’t understand, please understand.
After more than four months, xmake finally updated the new version v2.2.2 and launched the heavyweight feature: Natively Supported Remote Dependency Package Management.
This feature, in fact, I have been writing for almost a year, before the initial completion, for the development of this feature and history, interested students can look at the relevant issues: #69.
The current implementation is as follows, a fully consistent semantic version dependency description:
Fully consistent cross-platform build behavior, one-click xmake compilation:
Complete project description:
add_requires("tbox 1.6.*", "libpng ~1.16", "zlib")
target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("tbox", "libpng", "zlib")
Let me briefly introduce the background of my function:
When we write C/C++ programs, the use of third-party dependencies has always been a big problem. Because each build library has different build systems and different code platform support, it can’t be like other high-level languages. Convenient and easy to use package management support.
Although there are package management tools such as homebrew, vcpkg and so on to solve this problem, there are some limitations, such as:
For the existing cross-platform build tools, there is no built-in package management support. For example, cmake only provides find_package
to find system packages. Although it can be used with third-party package management such as vcpkg, I personally feel that it is not very Convenience.
This will make other users of the project need to install vcpkg or install the dependent library to the system when compiling. For the pc platform, it is better to use it. For the iphoneos, android and other platforms, the user will toss on the library. It will be a while.
And xmake’s philosophy is: Consistent maintenance, One-click compilation
xmake
command to compile.Cmake also needs to generate additional third-party IDE project files, even if cmakelist.txt is the same, but the build and maintenance experience is not guaranteed to be completely consistent for the user. After all, it is limited to such tools as vc/make.
tb_vsnprintf
overflow