diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 11 |
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) | |||
| 68 | if (NOT MSVC) | 68 | if (NOT MSVC) |
| 69 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") | 69 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") |
| 70 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") | 70 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") |
| 71 | |||
| 72 | if (MINGW) | ||
| 73 | add_definitions(-DMINGW_HAS_SECURE_API) | ||
| 74 | if (MINGW_STATIC_BUILD) | ||
| 75 | add_definitions(-DQT_STATICPLUGIN) | ||
| 76 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") | ||
| 77 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") | ||
| 78 | endif() | ||
| 79 | endif() | ||
| 71 | else() | 80 | else() |
| 72 | # Silence "deprecation" warnings | 81 | # Silence "deprecation" warnings |
| 73 | add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS) | 82 | add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS) |
| @@ -175,7 +184,7 @@ IF (APPLE) | |||
| 175 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") | 184 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") |
| 176 | ELSEIF(MINGW) | 185 | ELSEIF(MINGW) |
| 177 | # PSAPI is the Process Status API | 186 | # PSAPI is the Process Status API |
| 178 | set(PLATFORM_LIBRARIES winmm ws2_32 psapi) | 187 | set(PLATFORM_LIBRARIES winmm ws2_32 psapi imm32 version) |
| 179 | 188 | ||
| 180 | # WSAPoll functionality doesn't exist before WinNT 6.x (Vista and up) | 189 | # WSAPoll functionality doesn't exist before WinNT 6.x (Vista and up) |
| 181 | add_definitions(-D_WIN32_WINNT=0x0600) | 190 | add_definitions(-D_WIN32_WINNT=0x0600) |