Skip to content

Commit

Permalink
Fix CMake utils
Browse files Browse the repository at this point in the history
- Fix asset packager output
- Fix base dir match
  • Loading branch information
davreev committed Aug 31, 2024
1 parent ee96ef0 commit 328263a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/app-utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 328263a

Please sign in to comment.