Project#
- Project(name:, base_dir:)#
Define a new project.
- Parameters:
name – A name for the project.
base_dir – The project’s directory, where build.rb is located (default: script directory).
- Return type:
- import_cmake(dir, flags)#
Import a CMake project.
- Parameters:
dir – The directory of the CMake project.
flags – An array of flags to pass to CMake
- import_meson(dir, flags, dependency_files)#
Import a Meson project.
- Parameters:
dir – The directory of the Meson project (where meson.build lives).
flags – An array of flags to pass to meson configure
dependency_files –
An array of files to additionally depend on. When one of these files changes, the meson project is reconfigured.
For example, when using
--cross-file, thecrossfile.inican be passed here to reconfigure the meson project when the crossfile has changed.
Example
ini_file = File.absolute_path("emscripten.ini") import_meson "./deps/cairo", ["--cross-file", ini_file], [ini_file]
- import_cargo(dir)#
Import a Cargo project.
- Parameters:
dir – The path to the Cargo project (where cargo.toml lives).
- import_spm(dir)#
Import a Swift Package Manager project.
- Parameters:
dir – The path to the SPM project (where Package.swift lives).