diff options
| author | 2022-07-25 16:45:38 -0400 | |
|---|---|---|
| committer | 2022-09-04 21:36:05 -0400 | |
| commit | c976613ab25130e8fc8b6c0de03cf380eb46c64e (patch) | |
| tree | 594bd200694c2d7b2a66b9f3f812f9ad68b04d91 /CMakeLists.txt | |
| parent | mini_dump: Check for debugger before spawning a child (diff) | |
| download | yuzu-c976613ab25130e8fc8b6c0de03cf380eb46c64e.tar.gz yuzu-c976613ab25130e8fc8b6c0de03cf380eb46c64e.tar.xz yuzu-c976613ab25130e8fc8b6c0de03cf380eb46c64e.zip | |
vcpkg,cmake: Use vcpkg for dbghelp
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ab0ea589..20dd1383f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -38,6 +38,8 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON) | |||
| 38 | 38 | ||
| 39 | option(YUZU_TESTS "Compile tests" ON) | 39 | option(YUZU_TESTS "Compile tests" ON) |
| 40 | 40 | ||
| 41 | CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF) | ||
| 42 | |||
| 41 | option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}") | 43 | option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}") |
| 42 | 44 | ||
| 43 | option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON) | 45 | option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON) |
| @@ -46,6 +48,9 @@ if (YUZU_USE_BUNDLED_VCPKG) | |||
| 46 | if (YUZU_TESTS) | 48 | if (YUZU_TESTS) |
| 47 | list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests") | 49 | list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests") |
| 48 | endif() | 50 | endif() |
| 51 | if (YUZU_CRASH_DUMPS) | ||
| 52 | list(APPEND VCPKG_MANIFEST_FEATURES "dbghelp") | ||
| 53 | endif() | ||
| 49 | 54 | ||
| 50 | include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake) | 55 | include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake) |
| 51 | elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") | 56 | elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") |
| @@ -447,6 +452,13 @@ elseif (WIN32) | |||
| 447 | # PSAPI is the Process Status API | 452 | # PSAPI is the Process Status API |
| 448 | set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version) | 453 | set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version) |
| 449 | endif() | 454 | endif() |
| 455 | |||
| 456 | if (YUZU_CRASH_DUMPS) | ||
| 457 | find_library(DBGHELP_LIBRARY dbghelp) | ||
| 458 | if ("${DBGHELP_LIBRARY}" STREQUAL "DBGHELP_LIBRARY-NOTFOUND") | ||
| 459 | message(FATAL_ERROR "YUZU_CRASH_DUMPS enabled but dbghelp library not found") | ||
| 460 | endif() | ||
| 461 | endif() | ||
| 450 | elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$") | 462 | elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$") |
| 451 | set(PLATFORM_LIBRARIES rt) | 463 | set(PLATFORM_LIBRARIES rt) |
| 452 | endif() | 464 | endif() |