From 5e4dc31a2f1f9fc6c7cba4ec9d0523a3ed854e35 Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 11 Apr 2024 20:01:35 +0200 Subject: [PATCH] cmake bugfix empty string during BUILD_TREE_DEPLOY --- cmake/Modules/TinyDeployment.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/TinyDeployment.cmake b/cmake/Modules/TinyDeployment.cmake index 2258be444..edb471970 100644 --- a/cmake/Modules/TinyDeployment.cmake +++ b/cmake/Modules/TinyDeployment.cmake @@ -358,9 +358,14 @@ function(tiny_build_tree_deployment) list(LENGTH filesToDeploy filesToDeployCount) - if(filesToDeployCount GREATER 0) + if((TINY_BUILD_LOADABLE_DRIVERS OR TINY_BUILD_SHARED_DRIVERS) AND + filesToDeployCount GREATER 0 + ) + # Without the COMMAND_EXPAND_LISTS it fails for Release builds because expression + # for the TARGET_PDB_FILE file returns "" an empty string add_custom_target(TinyBuildTreeDeployTarget ALL ${CMAKE_COMMAND} -E copy -t ${CMAKE_BINARY_DIR} ${filesToDeploy} + COMMAND_EXPAND_LISTS VERBATIM COMMENT "Copying ${TinyDrivers_target} libraries to the root of the build tree..."