From 328263aec7853b2751c3f0f005db62eeda1bcdce Mon Sep 17 00:00:00 2001 From: David Reeves Date: Thu, 29 Aug 2024 23:28:34 +0100 Subject: [PATCH] Fix CMake utils - Fix asset packager output - Fix base dir match --- cmake/app-utils.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/app-utils.cmake b/cmake/app-utils.cmake index da32f81..529498a 100644 --- a/cmake/app-utils.cmake +++ b/cmake/app-utils.cmake @@ -9,9 +9,9 @@ endfunction() function(get_base_dir file result_) - if(file MATCHES "^${gen_dir}") + if(gen_dir AND file MATCHES "^${gen_dir}") set(result ${gen_dir}) - elseif(file MATCHES "^${src_dir}") + elseif(src_dir AND file MATCHES "^${src_dir}") set(result ${src_dir}) else() message(FATAL_ERROR "Unexpected file location: ${file}") @@ -139,7 +139,7 @@ function(package_assets) # Create asset package via Emscripten's file packager utility set(emsc_file_packager "${EMSCRIPTEN_ROOT_PATH}/tools/file_packager") - set(output "${runtime_output_dir}/assets.data") + set(output "${runtime_output_dir}/${app-name}-assets.data") add_custom_command( OUTPUT ${output}