mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 21:38:09 -05:00
Add mingw compile support
This commit is contained in:
@ -68,6 +68,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
|
||||
if (MINGW)
|
||||
add_definitions(-DMINGW_HAS_SECURE_API)
|
||||
if (MINGW_STATIC_BUILD)
|
||||
add_definitions(-DQT_STATICPLUGIN)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# Silence "deprecation" warnings
|
||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS)
|
||||
@ -175,7 +184,7 @@ IF (APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
||||
ELSEIF(MINGW)
|
||||
# PSAPI is the Process Status API
|
||||
set(PLATFORM_LIBRARIES winmm ws2_32 psapi)
|
||||
set(PLATFORM_LIBRARIES winmm ws2_32 psapi imm32 version)
|
||||
|
||||
# WSAPoll functionality doesn't exist before WinNT 6.x (Vista and up)
|
||||
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||
|
Reference in New Issue
Block a user