From 1e8ef10e9cffccafcbc47057f6a7ed175b26f8a4 Mon Sep 17 00:00:00 2001 From: Toby Davis Date: Wed, 29 May 2024 05:07:06 +0100 Subject: [PATCH] Allow specification of a CMake root directory --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/builders/cmake.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0bebc20..49baa7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "sccmod" -version = "0.2.2" +version = "0.2.3" dependencies = [ "anstyle", "clap", diff --git a/Cargo.toml b/Cargo.toml index 814c23a..47639df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sccmod" authors = ["Toby Davis \"Pencilcaseman\""] -version = "0.2.2" +version = "0.2.3" edition = "2021" readme = "README.md" license = "MIT OR Apache-2.0" diff --git a/src/builders/cmake.rs b/src/builders/cmake.rs index 88bee7b..07b1b3b 100644 --- a/src/builders/cmake.rs +++ b/src/builders/cmake.rs @@ -1,4 +1,4 @@ -use crate::{builders::builder_trait::BuilderImpl, log, shell::Shell}; +use crate::{builders::builder_trait::BuilderImpl, file_manager::PATH_SEP, log, shell::Shell}; use pyo3::prelude::PyAnyMethods; use pyo3::{Bound, PyAny}; use std::{fs, path, path::Path}; @@ -156,7 +156,7 @@ impl BuilderImpl for CMake { dependencies: &[String], ) -> Result<(), String> { let cmake_source_path = if let Some(root) = &self.cmake_root { - source_path.as_ref().to_str().unwrap().to_owned() + root + source_path.as_ref().to_str().unwrap().to_owned() + PATH_SEP.to_string().as_ref() + root } else { source_path.as_ref().to_str().unwrap().to_owned() };