diff options
| author | 2022-07-25 16:45:38 -0400 | |
|---|---|---|
| committer | 2022-09-04 21:36:05 -0400 | |
| commit | c976613ab25130e8fc8b6c0de03cf380eb46c64e (patch) | |
| tree | 594bd200694c2d7b2a66b9f3f812f9ad68b04d91 | |
| 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 '')
| -rw-r--r-- | CMakeLists.txt | 12 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | vcpkg.json | 4 |
3 files changed, 17 insertions, 1 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() |
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 3d9906ade..df0f64b83 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -208,7 +208,7 @@ add_executable(yuzu | |||
| 208 | yuzu.rc | 208 | yuzu.rc |
| 209 | ) | 209 | ) |
| 210 | 210 | ||
| 211 | if (WIN32 AND NOT ("${DBGHELP_LIBRARY}" STREQUAL "DBGHELP_LIBRARY-NOTFOUND")) | 211 | if (WIN32 AND YUZU_CRASH_DUMPS) |
| 212 | target_sources(yuzu PRIVATE | 212 | target_sources(yuzu PRIVATE |
| 213 | mini_dump.cpp | 213 | mini_dump.cpp |
| 214 | mini_dump.h | 214 | mini_dump.h |
diff --git a/vcpkg.json b/vcpkg.json index c4413e22a..3c92510d6 100644 --- a/vcpkg.json +++ b/vcpkg.json | |||
| @@ -31,6 +31,10 @@ | |||
| 31 | "yuzu-tests": { | 31 | "yuzu-tests": { |
| 32 | "description": "Compile tests", | 32 | "description": "Compile tests", |
| 33 | "dependencies": [ "catch2" ] | 33 | "dependencies": [ "catch2" ] |
| 34 | }, | ||
| 35 | "dbghelp": { | ||
| 36 | "description": "Compile Windows crash dump (Minidump) support", | ||
| 37 | "dependencies": [ "dbghelp" ] | ||
| 34 | } | 38 | } |
| 35 | }, | 39 | }, |
| 36 | "overrides": [ | 40 | "overrides": [ |