cmake_add_configure_build_install()

def cmake_add_configure_build_install(name, source_directory, build_directory, prefix_paths, configure_inputs, build_inputs, configure_args, configure_env, build_args, build_env, build_artifact_globs, deps, install_path, skip_install, find_using_cmake_system_path, env, visibility)

Add a CMake project to the build

Args

  • name: string: The name of the project
  • source_directory: string: The directory of the project
  • build_directory: The directory to build the project in (default is build/)
  • prefix_paths: The paths to add to the CMAKE_PREFIX_PATH: default is sysroot;build/install (uses absolute paths)
  • configure_inputs: The inputs for the configure step. Default uses cmake files in source directory
  • build_inputs: The inputs for the build step. Default uses source directory
  • configure_args: list: The arguments to pass to the configure script
  • configure_env: dict: The environment variables to set for the configure step
  • build_args: list: The arguments to pass to the build command
  • build_env: dict: The environment variables to set for the build step
  • build_artifact_globs: The globs to match when installing build artifacts
  • deps: list: The dependencies of the project
  • install_path: The path to install the project
  • skip_install: bool: Skip the install step
  • find_using_cmake_system_path: bool: Allow cmake to look at system paths
  • env: dict: The environment variables to set during configure, make, and install
  • visibility: Rule visibility: Public|Private|Rules[]. See visbility.star for more info.

cmake_add_repo()

def cmake_add_repo(name, url, rev, install_path, configure_args, configure_env, configure_inputs, build_args, build_env, build_artifact_globs, checkout_submodules, relative_source_directory, clone, checkout_type, skip_install, find_using_cmake_system_path, deps, env, visibility)

Add a CMake project to the build

Args

  • name: string: The name of the project
  • url: string: The URL of the repository
  • rev: string: The revision of the repository
  • install_path: The path to install the project
  • configure_args: list: The arguments to pass to the configure script
  • configure_env: dict: Additional env values during configure
  • configure_inputs: globs to include when checking if configure shoudl re-run
  • build_args: list: The arguments to pass to the build command
  • build_env: dict: Additional env values during build
  • build_artifact_globs: list: The globs to match when installing build artifacts
  • checkout_submodules: bool: Whether to checkout submodules
  • relative_source_directory: The directory of the project (default is the name)
  • clone: string: The clone type (Worktree, Blobless, Shallow, Default)
  • checkout_type: use checkout_type_optional() to skip rule checkout
  • skip_install: bool: Skip the install step
  • find_using_cmake_system_path: bool: Allow cmake to look at system paths
  • deps: list: The dependencies of the project
  • env: dict: Additional env values during configure, build, install
  • visibility: Rule visibility: Public|Private|Rules[]. See visbility.star for more info.

cmake_add_source_archive()

def cmake_add_source_archive(name, url, sha256, source_directory, filename, install_path, configure_args, configure_env, configure_inputs, build_args, build_env, build_artifact_globs, deps, checkout_type, skip_install, env, visibility)

Add a CMake project to the build

Args

  • name: string: The name of the project
  • url: string: The URL of the source archive
  • sha256: string: The SHA256 of the source archive
  • source_directory: string: The directory of the project
  • filename: The filename of the source archive
  • install_path: The path to install the project
  • configure_args: list: The arguments to pass to the configure script
  • configure_env: dict: Additional env values during configure
  • configure_inputs: globs to include when checking if configure shoudl re-run
  • build_args: list: The arguments to pass to the build command
  • build_env: dict: Additional env values during build
  • build_artifact_globs: The globs to match when installing build artifacts
  • deps: list: List of dependencies of the project
  • checkout_type: use checkout_type_optional() to skip rule checkout
  • skip_install: bool: Skip the install step
  • env: dict: Additional env values during configure, build, and install
  • visibility: Rule visibility: Public|Private|Rules[]. See visbility.star for more info.

cmake_get_default_prefix_paths()

def cmake_get_default_prefix_paths(install_path) -> list

Get the default prefix paths for CMake

Args

  • install_path: The path to install the project

Returns

A list of the default prefix paths