ddnet/cmake/FindExceptionHandling.cmake
2022-02-18 11:35:06 +01:00

22 lines
792 B
CMake

if(TARGET_OS STREQUAL "windows")
set_extra_dirs_lib(EXCEPTION_HANDLING exception_handling)
find_file(EXCEPTION_HANDLING_LIBRARY
NAMES exchndl.dll
HINTS ${HINTS_EXCEPTION_HANDLING_LIBDIR}
PATHS ${PATHS_EXCEPTION_HANDLING_LIBDIR}
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
)
is_bundled(EXCEPTION_HANDLING_BUNDLED "${EXCEPTION_HANDLING_LIBRARY}")
if(NOT EXCEPTION_HANDLING_BUNDLED)
message(FATAL_ERROR "could not find exception handling paths")
endif()
set(EXCEPTION_HANDLING_COPY_FILES
"${EXTRA_EXCEPTION_HANDLING_LIBDIR}/exchndl.dll"
"${EXTRA_EXCEPTION_HANDLING_LIBDIR}/dbgcore.dll"
"${EXTRA_EXCEPTION_HANDLING_LIBDIR}/dbghelp.dll"
"${EXTRA_EXCEPTION_HANDLING_LIBDIR}/mgwhelp.dll"
"${EXTRA_EXCEPTION_HANDLING_LIBDIR}/symsrv.dll"
)
endif()