Skip to main content

lux_lib/lua_rockspec/build/
cmake.rs

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