[build][msvc] Fix debug information and set hidpi support

* Add /ZI compiler flag in Debug mode to get proper debug symbols.
* Specify hidpi support in the app manifest.
This commit is contained in:
Fabrice de Gans 2022-09-26 16:32:25 -07:00 committed by Rafael Kitover
parent b027e64753
commit 69d24fb53e
2 changed files with 5 additions and 2 deletions

View File

@ -816,7 +816,7 @@ elseif(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL Debug) if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(runtime "${runtime}d") set(runtime "${runtime}d")
add_compiler_flags(${runtime} /W4 /Ob0 /Od /RTC1 /DDEBUG) add_compiler_flags(${runtime} /ZI /W4 /Ob0 /Od /RTC1 /DDEBUG)
else() else()
add_compiler_flags(/w /DNDEBUG) add_compiler_flags(/w /DNDEBUG)

View File

@ -120,7 +120,7 @@ if(WIN32 AND CMAKE_TOOLCHAIN_FILE MATCHES vcpkg AND (X86_32 OR X86_64))
add_definitions(-DWXUSINGDLL) add_definitions(-DWXUSINGDLL)
endif() endif()
add_definitions(-D_UNICODE -DUNICODE -DwxUSE_GUI=1 -D__WXMSW__) add_definitions(-D_UNICODE -DUNICODE -DwxUSE_GUI=1 -D__WXMSW__ -DwxUSE_RC_MANIFEST -DwxUSE_DPI_AWARE_MANIFEST=2)
set(common_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}) set(common_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix})
set(dbg_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/debug) set(dbg_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/debug)
@ -1009,6 +1009,9 @@ if(NOT TRANSLATIONS_ONLY)
elseif(MSVC) elseif(MSVC)
# the debug lib libcmtd is linked in debug mode, so don't link the normal version # the debug lib libcmtd is linked in debug mode, so don't link the normal version
set_target_properties(visualboyadvance-m PROPERTIES LINK_FLAGS_DEBUG "/nodefaultlib:libcmt /subsystem:console") set_target_properties(visualboyadvance-m PROPERTIES LINK_FLAGS_DEBUG "/nodefaultlib:libcmt /subsystem:console")
# Disable the auto-generated manifest from CMake.
target_link_options(visualboyadvance-m PRIVATE "/MANIFEST:NO")
endif() endif()
# Make the app a console app in debug mode to get log messages. # Make the app a console app in debug mode to get log messages.