qiBuild documentation

qibuild.project – Managing projects

qibuild.project.BuildProject

class qibuild.project.BuildProject(build_worktree, worktree_project)
qiproject_xml

Path to qiproject.xml

build_directory

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

cmake_args

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

build_env

The environment to use when calling cmake or build commands

sdk_directory

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

configure(**kwargs)

Delegate to qibuild.cmake.cmake()

generate_qitest_json()

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

Parameters:
  • 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

fix_shared_libs(paths)

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

get_build_dirs(all_configs=False)

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.