[cmake] fix hash fetch

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-08-26 20:53:46 -04:00
parent 752ba2de48
commit 767596ed38

View file

@ -375,9 +375,13 @@ function(AddPackage)
file(DOWNLOAD ${hash_url} ${outfile}) file(DOWNLOAD ${hash_url} ${outfile})
endif() endif()
file(READ ${outfile} pkg_hash_tmp) if (EXISTS ${outfile})
file(READ ${outfile} pkg_hash_tmp)
endif()
set(pkg_hash "${hash_algo}=${pkg_hash_tmp}") if (DEFINED ${pkg_hash_tmp})
set(pkg_hash "${hash_algo}=${pkg_hash_tmp}")
endif()
endif() endif()
# TODO(crueter): force system/bundled for specific packages via options e.g httplib_SYSTEM # TODO(crueter): force system/bundled for specific packages via options e.g httplib_SYSTEM