mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-18 00:23:14 +00:00
Allow builds on MSYS2 & improve Windows build steps documentation
This commit is contained in:
parent
c60bfbe2a5
commit
e070dab2f0
2 changed files with 85 additions and 14 deletions
|
@ -643,23 +643,40 @@ if (ENABLE_QT_GUI)
|
|||
endif()
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(shadps4 PRIVATE mincore winpthreads clang_rt.builtins-x86_64.lib)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||
target_link_libraries(shadps4 PRIVATE mincore winpthreads)
|
||||
|
||||
if (MSVC)
|
||||
# MSVC likes putting opinions on what people can use, disable:
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||
|
||||
if (MSVC)
|
||||
# Needed for conflicts with time.h of windows.h
|
||||
add_definitions(-D_TIMESPEC_DEFINED)
|
||||
endif()
|
||||
|
||||
# Target Windows 10 RS5
|
||||
add_definitions(-DNTDDI_VERSION=0x0A000006 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
||||
# Increase stack commit area
|
||||
target_link_options(shadps4 PRIVATE /STACK:0x200000,0x200000)
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(shadps4 PRIVATE clang_rt.builtins-x86_64.lib)
|
||||
endif()
|
||||
|
||||
# Disable ASLR so we can reserve the user area
|
||||
if (MSVC)
|
||||
target_link_options(shadps4 PRIVATE /DYNAMICBASE:NO)
|
||||
else()
|
||||
target_link_options(shadps4 PRIVATE -Wl,--disable-dynamicbase)
|
||||
endif()
|
||||
|
||||
# Increase stack commit area (Needed, otherwise there are crashes)
|
||||
if (MSVC)
|
||||
target_link_options(shadps4 PRIVATE /STACK:0x200000,0x200000)
|
||||
else()
|
||||
target_link_options(shadps4 PRIVATE -Wl,--stack,2097152)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue