cmake: update Crashpad find script for macOS changes

This commit is contained in:
itsmattkc
2023-05-02 14:20:42 -07:00
parent d75aef40a8
commit 7fa69ea570
+8 -28
View File
@@ -91,13 +91,11 @@ set (_crashpad_required
) )
if (WIN32 OR (UNIX AND NOT APPLE)) if (WIN32 OR (UNIX AND NOT APPLE))
set (_crashpad_components list(APPEND _crashpad_components
${_crashpad_components}
compat/compat compat/compat
) )
set (_crashpad_required list(APPEND _crashpad_required
${_crashpad_required}
CRASHPAD_COMPAT_LIB CRASHPAD_COMPAT_LIB
) )
endif() endif()
@@ -118,36 +116,18 @@ foreach (COMPONENT ${_crashpad_components})
endforeach() endforeach()
if (APPLE) if (APPLE)
# macOS requires a bunch of extra loose object files that aren't made into static libraries list(APPEND _crashpad_required
# See: https://groups.google.com/a/chromium.org/g/crashpad-dev/c/XVggc7kvlNs/m/msMjHS4KAQAJ MIG_OUTPUT_LIB
set (_crashpad_mach_loose_objects
child_portServer
#mach_excServer
child_portUser
#mach_excUser
excServer
notifyServer
excUser
notifyUser
) )
foreach (COMPONENT ${_crashpad_mach_loose_objects}) find_library(MIG_OUTPUT_LIB
string(TOUPPER ${COMPONENT} UPPER_COMPONENT)
set(LIB_NAME CRASHPAD_MACH_${UPPER_COMPONENT}_LIB)
find_file(${LIB_NAME}
NAMES NAMES
mig_output.${COMPONENT}.o mig_output
HINTS HINTS
"${CRASHPAD_LIBRARY_DIRS}/obj/out/Default/gen/util/mach" "${CRASHPAD_LIBRARY_DIRS}/obj/util"
) )
set (_crashpad_required list(APPEND CRASHPAD_LIBRARIES ${MIG_OUTPUT_LIB})
${_crashpad_required}
${LIB_NAME}
)
list(APPEND CRASHPAD_LIBRARIES ${${LIB_NAME}})
endforeach()
list(APPEND CRASHPAD_LIBRARIES list(APPEND CRASHPAD_LIBRARIES
bsm bsm