match script-mode fingerprint deployment target default

This commit is contained in:
patchzyy
2026-10-18 17:27:48 +02:00
parent 7d048d604b
commit 954c43127c
+5 -4
View File
@@ -39,10 +39,7 @@ function(mkw_runtime_fingerprint out_var runtime_dir cppwinrt_dir cpu_profile)
string(APPEND _manifest "cppwinrt:winrt/base.h ${_hash}\n")
endif()
string(APPEND _manifest "x86_cpu_profile ${cpu_profile}\n")
# Omitted when empty so Windows and Linux fingerprints are unaffected.
if(CMAKE_OSX_DEPLOYMENT_TARGET)
string(APPEND _manifest "osx_deployment_target ${CMAKE_OSX_DEPLOYMENT_TARGET}\n")
endif()
string(APPEND _manifest "osx_deployment_target ${CMAKE_OSX_DEPLOYMENT_TARGET}\n")
string(SHA256 _fingerprint "${_manifest}")
set(${out_var} "${_fingerprint}" PARENT_SCOPE)
endfunction()
@@ -91,6 +88,10 @@ if(CMAKE_SCRIPT_MODE_FILE AND _mkw_script STREQUAL _mkw_self)
if(NOT MKW_X86_CPU_PROFILE)
set(MKW_X86_CPU_PROFILE "v3")
endif()
# Same default runtime/CMakeLists.txt forces on every platform before project().
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0")
endif()
mkw_runtime_fingerprint(_mkw_fingerprint "${MKW_RUNTIME_DIR}" "${MKW_CPPWINRT_INCLUDE_DIR}" "${MKW_X86_CPU_PROFILE}")
# message() writes to stderr; the echo child inherits stdout.
execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "runtime_fingerprint=${_mkw_fingerprint}")