diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ab0ea589..b625743ea 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 "") |
| @@ -247,7 +252,7 @@ if(ENABLE_QT) | |||
| 247 | endif() | 252 | endif() |
| 248 | 253 | ||
| 249 | # Check for headers | 254 | # Check for headers |
| 250 | Include(FindPkgConfig REQUIRED) | 255 | find_package(PkgConfig REQUIRED) |
| 251 | pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0) | 256 | pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0) |
| 252 | if (NOT QT_DEP_GLU_FOUND) | 257 | if (NOT QT_DEP_GLU_FOUND) |
| 253 | message(FATAL_ERROR "Qt bundled pacakge dependency `glu` not found. \ | 258 | message(FATAL_ERROR "Qt bundled pacakge dependency `glu` not found. \ |
| @@ -381,7 +386,7 @@ endif() | |||
| 381 | 386 | ||
| 382 | # Ensure libusb is properly configured (based on dolphin libusb include) | 387 | # Ensure libusb is properly configured (based on dolphin libusb include) |
| 383 | if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB) | 388 | if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB) |
| 384 | include(FindPkgConfig) | 389 | find_package(PkgConfig) |
| 385 | if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") | 390 | if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") |
| 386 | pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) | 391 | pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) |
| 387 | else() | 392 | else() |
| @@ -405,7 +410,7 @@ set(FFmpeg_COMPONENTS | |||
| 405 | swscale) | 410 | swscale) |
| 406 | 411 | ||
| 407 | if (UNIX AND NOT APPLE) | 412 | if (UNIX AND NOT APPLE) |
| 408 | Include(FindPkgConfig REQUIRED) | 413 | find_package(PkgConfig REQUIRED) |
| 409 | pkg_check_modules(LIBVA libva) | 414 | pkg_check_modules(LIBVA libva) |
| 410 | endif() | 415 | endif() |
| 411 | if (NOT YUZU_USE_BUNDLED_FFMPEG) | 416 | if (NOT YUZU_USE_BUNDLED_FFMPEG) |
| @@ -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() |
| @@ -529,9 +541,9 @@ add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY | |||
| 529 | # Adjustments for MSVC + Ninja | 541 | # Adjustments for MSVC + Ninja |
| 530 | if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja") | 542 | if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja") |
| 531 | add_compile_options( | 543 | add_compile_options( |
| 532 | /wd4711 # function 'function' selected for automatic inline expansion | ||
| 533 | /wd4464 # relative include path contains '..' | 544 | /wd4464 # relative include path contains '..' |
| 534 | /wd4820 # 'identifier1': '4' bytes padding added after data member 'identifier2' | 545 | /wd4711 # function 'function' selected for automatic inline expansion |
| 546 | /wd4820 # 'bytes' bytes padding added after construct 'member_name' | ||
| 535 | ) | 547 | ) |
| 536 | endif() | 548 | endif() |
| 537 | 549 | ||