mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
build: publish final runtime executable name
This commit is contained in:
@@ -62,6 +62,8 @@ def main() -> int:
|
||||
cmake = (ROOT / "runtime/runtime.cmake").read_text(encoding="utf-8")
|
||||
check("psxrecomp_exe_name-${target}.txt" in cmake,
|
||||
"runtime.cmake writes psxrecomp_exe_name-<target>.txt")
|
||||
check("file(GENERATE" in cmake and "TARGET_FILE_BASE_NAME:${target}" in cmake,
|
||||
"marker uses the final CMake target filename")
|
||||
check('MAKE_C_IDENTIFIER "${PSXRT_WINDOW_TITLE}"' in cmake,
|
||||
"OUTPUT_NAME still derives from WINDOW_TITLE (marker must match it)")
|
||||
|
||||
|
||||
@@ -976,13 +976,11 @@ function(psxrecomp_add_runtime_target target)
|
||||
# Revelations_Persona__Recompiled.exe — same algorithm, colon in a
|
||||
# different place.
|
||||
#
|
||||
# Written at configure time (not file(GENERATE)) because _psxrt_exe_name is
|
||||
# a plain variable here: it carries no generator expression and does not
|
||||
# vary per configuration, so a fixed filename is correct on multi-config
|
||||
# generators too. Name only, never a path — the consumers already know
|
||||
# their build directory, and only ever got the basename wrong.
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/psxrecomp_exe_name-${target}.txt"
|
||||
"${_psxrt_exe_name}\n")
|
||||
# Generate-time output uses the final target property, so a game that
|
||||
# changes OUTPUT_NAME after this helper returns still publishes the name
|
||||
# CMake will actually link.
|
||||
file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/psxrecomp_exe_name-${target}.txt"
|
||||
CONTENT "$<TARGET_FILE_BASE_NAME:${target}>\n")
|
||||
|
||||
# ---- Windows / desktop app icon ---------------------------------------
|
||||
# Prefer an explicit APP_ICON, then the game-repo copy under assets/, then
|
||||
|
||||
Reference in New Issue
Block a user