From 7706f6526d67730654c40ec654c21d56c907faae Mon Sep 17 00:00:00 2001 From: Frodo45127 Date: Fri, 16 Feb 2024 05:54:31 +0100 Subject: [PATCH] Only check for renderer files if we are in debug mode. --- rpfm_ui/build.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rpfm_ui/build.rs b/rpfm_ui/build.rs index 4c8c7af7a..11a656c21 100644 --- a/rpfm_ui/build.rs +++ b/rpfm_ui/build.rs @@ -38,10 +38,6 @@ fn main() { let assets_path = "./../assets/"; DirBuilder::new().recursive(true).create(assets_path).unwrap(); - // TODO: unhardcode this path once the folder is moved to a 3rdparty subrepo. - let renderer_path = "./../../QtRenderingWidget/"; - println!("cargo:rerun-if-changed={}", renderer_path); - println!("cargo:rustc-link-lib=dylib=ImportExport"); println!("cargo:rustc-link-lib=dylib=Rldx"); println!("cargo:rustc-link-lib=dylib=QtRenderingWidget"); @@ -49,6 +45,11 @@ fn main() { // This compiles the model renderer and related libs. Only in debug mode, as on releases we may not have access to the source code, // so we use precompiled binaries instead. if cfg!(debug_assertions) { + + // TODO: unhardcode this path once the folder is moved to a 3rdparty subrepo. + let renderer_path = "./../../QtRenderingWidget/"; + println!("cargo:rerun-if-changed={}", renderer_path); + match Command::new("msbuild") .arg("./QtRenderingWidget_RPFM.sln") .arg("-m") // Enable multithread build.