summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2016-08-01 23:13:35 +0200
committerJames Rowe <jroweboy@gmail.com>2016-11-14 07:50:46 +0100
commitc3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395 (patch)
tree282996d714b4c104ae0270ba0c505160b05207d0 /CMakeLists.txt
parentMerge pull request #2171 from jroweboy/fix-mac-build (diff)
downloadyuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.tar
yuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.tar.gz
yuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.tar.bz2
yuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.tar.lz
yuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.tar.xz
yuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.tar.zst
yuzu-c3ea6f4ddb4aeed9663b5039e9ab11a7fef7c395.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26dec8f86..56503f1ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)