summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt12
-rw-r--r--src/yuzu/CMakeLists.txt2
-rw-r--r--vcpkg.json4
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
39option(YUZU_TESTS "Compile tests" ON) 39option(YUZU_TESTS "Compile tests" ON)
40 40
41CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF)
42
41option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}") 43option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
42 44
43option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON) 45option(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)
51elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") 56elseif(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()
450elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$") 462elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
451 set(PLATFORM_LIBRARIES rt) 463 set(PLATFORM_LIBRARIES rt)
452endif() 464endif()
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
211if (WIN32 AND NOT ("${DBGHELP_LIBRARY}" STREQUAL "DBGHELP_LIBRARY-NOTFOUND")) 211if (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": [