Skip to main content

lux_lib/lua_rockspec/build/
cmake.rs

1use std::collections::HashMap;
2
3/// Specification for building a rock with the `cmake` build backend
4#[derive(Debug, PartialEq, Clone)]
5pub struct CMakeBuildSpec {
6    pub cmake_lists_content: Option<String>,
7    /// Whether to perform a build pass.
8    /// Default is true.
9    pub build_pass: bool,
10    /// Whether to perform an install pass.
11    /// Default is true.
12    pub install_pass: bool,
13    pub variables: HashMap<String, String>,
14}
15
16impl Default for CMakeBuildSpec {
17    fn default() -> Self {
18        Self {
19            cmake_lists_content: Default::default(),
20            build_pass: default_pass(),
21            install_pass: default_pass(),
22            variables: Default::default(),
23        }
24    }
25}
26
27fn default_pass() -> bool {
28    true
29}