updater: Update CMake to make builds more reproducible

Strip the PDB. Provide an alternate path for the PDB.

We already use /PDBALTPATH for set_target_properties_obs, but this
target understandably does not use that.
This commit is contained in:
Ryan Foster
2026-02-19 19:50:33 -05:00
parent 1106c1acaf
commit 3786fa3d3e

View File

@@ -32,7 +32,13 @@ target_link_libraries(
)
# zstd is hardcoded with /DEFAULTLIB:LIBCMT
target_link_options(updater PRIVATE $<$<CONFIG:DEBUG>:/NODEFAULTLIB:LIBCMT>)
target_link_options(
updater
PRIVATE
$<$<CONFIG:DEBUG>:/NODEFAULTLIB:LIBCMT>
"$<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:/PDBALTPATH:$<TARGET_PDB_FILE_NAME:updater>>"
"$<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:/PDBSTRIPPED:$<TARGET_PDB_FILE_NAME:updater>>"
)
set_target_properties(
updater