qiBuild documentation

qibuild.project – Managing projects


class qibuild.project.BuildProject(build_worktree, worktree_project)

Path to qiproject.xml


Return a suitable build directory, depending on the build setting of the worktree: the build config, and whether or not a build prefix is set


The list of CMake arguments to use when configuring the project. Delegates to build_config.cmake_args


The environment to use when calling cmake or build commands


The sdk directory in the build directory

write_dependencies_cmake(sdk_dirs, host_dirs=None)

Write the dependencies.cmake file. This will be read by qibuild-config.cmake to set CMAKE_PREFIX_PATH and qibuild_DIR, so that just running cmake .. works


Delegate to qibuild.cmake.cmake()


The qitest.cmake is written from CMake

build(rebuild=False, target=None, coverity=False, env=None)

Build the project

parse_num_jobs(num_jobs, cmake_generator=None)

Convert a number of jobs to a list of cmake args

install(destdir, prefix='/', components=None, split_debug=False)

Install the project

  • project – project name.
  • destdir – destination. Note that when using qibuild install, we will first call cmake to make sure CMAKE_INSTALL_PREFIX is /. But this function simply calls cmake --target install in the simple case.
  • runtime – Whether to install the project as a runtime package or not. (see Using qi_install functions section for the details)
Package split_debug:

split the debug symbols out of the binaries useful for qibuild deploy


Do some magic so that shared libraries from other projects and packages from toolchains are found

Called by CMakeBuilder before building

Parameters:paths – a list of paths from which to look for dependencies
split_debug(destdir, file_list)

Split debug symbols after install


Return a dictionary containing the build directory list for the known and the unknown configurations:

build_directories = {
    'known_configs' = [],
    'unknown_configs' = [],

Note: if all_configs if False, then the list of the unknown configuration remains empty.