strip_symbols(${targetName} symbol_file)
install_symbols(${symbol_file} ${destination})
endif()
+
+ if ((CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS) AND ("${kind}" STREQUAL "TARGETS"))
+ # We want to avoid the kind=TARGET install behaviors which corrupt code signatures on osx-arm64
+ set(kind PROGRAMS)
+ endif()
+
if ("${kind}" STREQUAL "TARGETS")
set(install_source ${targetName})
elseif("${kind}" STREQUAL "PROGRAMS")
_install (FILES $<TARGET_PDB_FILE:superpmi-shim-collector> DESTINATION PDB)
endif(CLR_CMAKE_HOST_UNIX)
-_install (TARGETS superpmi-shim-collector DESTINATION .)
+_install (PROGRAMS $<TARGET_FILE:superpmi-shim-collector> DESTINATION .)
_install (FILES $<TARGET_PDB_FILE:superpmi-shim-counter> DESTINATION PDB)
endif(CLR_CMAKE_HOST_UNIX)
-_install (TARGETS superpmi-shim-counter DESTINATION .)
+_install (PROGRAMS $<TARGET_FILE:superpmi-shim-counter> DESTINATION .)
_install (FILES $<TARGET_PDB_FILE:superpmi-shim-simple> DESTINATION PDB)
endif(CLR_CMAKE_HOST_UNIX)
-_install (TARGETS superpmi-shim-simple DESTINATION .)
+_install (PROGRAMS $<TARGET_FILE:superpmi-shim-simple> DESTINATION .)