mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-14 06:45:17 +00:00
vcpkg,cmake: Use vcpkg for dbghelp
This commit is contained in:
parent
e339ec0e00
commit
c976613ab2
|
@ -38,6 +38,8 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
|
||||||
|
|
||||||
option(YUZU_TESTS "Compile tests" ON)
|
option(YUZU_TESTS "Compile tests" ON)
|
||||||
|
|
||||||
|
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF)
|
||||||
|
|
||||||
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
||||||
|
|
||||||
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON)
|
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON)
|
||||||
|
@ -46,6 +48,9 @@ if (YUZU_USE_BUNDLED_VCPKG)
|
||||||
if (YUZU_TESTS)
|
if (YUZU_TESTS)
|
||||||
list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests")
|
list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests")
|
||||||
endif()
|
endif()
|
||||||
|
if (YUZU_CRASH_DUMPS)
|
||||||
|
list(APPEND VCPKG_MANIFEST_FEATURES "dbghelp")
|
||||||
|
endif()
|
||||||
|
|
||||||
include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake)
|
include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake)
|
||||||
elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "")
|
elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "")
|
||||||
|
@ -447,6 +452,13 @@ elseif (WIN32)
|
||||||
# PSAPI is the Process Status API
|
# PSAPI is the Process Status API
|
||||||
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version)
|
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (YUZU_CRASH_DUMPS)
|
||||||
|
find_library(DBGHELP_LIBRARY dbghelp)
|
||||||
|
if ("${DBGHELP_LIBRARY}" STREQUAL "DBGHELP_LIBRARY-NOTFOUND")
|
||||||
|
message(FATAL_ERROR "YUZU_CRASH_DUMPS enabled but dbghelp library not found")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
|
elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
|
||||||
set(PLATFORM_LIBRARIES rt)
|
set(PLATFORM_LIBRARIES rt)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -208,7 +208,7 @@ add_executable(yuzu
|
||||||
yuzu.rc
|
yuzu.rc
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WIN32 AND NOT ("${DBGHELP_LIBRARY}" STREQUAL "DBGHELP_LIBRARY-NOTFOUND"))
|
if (WIN32 AND YUZU_CRASH_DUMPS)
|
||||||
target_sources(yuzu PRIVATE
|
target_sources(yuzu PRIVATE
|
||||||
mini_dump.cpp
|
mini_dump.cpp
|
||||||
mini_dump.h
|
mini_dump.h
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
"yuzu-tests": {
|
"yuzu-tests": {
|
||||||
"description": "Compile tests",
|
"description": "Compile tests",
|
||||||
"dependencies": [ "catch2" ]
|
"dependencies": [ "catch2" ]
|
||||||
|
},
|
||||||
|
"dbghelp": {
|
||||||
|
"description": "Compile Windows crash dump (Minidump) support",
|
||||||
|
"dependencies": [ "dbghelp" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
|
|
Loading…
Reference in a new issue