summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df7fe0cba..7e3f2ab8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,14 +169,13 @@ endif()
169 169
170IF (APPLE) 170IF (APPLE)
171 FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related 171 FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related
172 set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) 172 set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
173 173
174 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") 174 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
175 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") 175 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
176ELSEIF(MINGW) 176ELSEIF(MINGW)
177 # GCC does not support codecvt, so use iconv instead
178 # PSAPI is the Process Status API 177 # PSAPI is the Process Status API
179 set(PLATFORM_LIBRARIES winmm ws2_32 psapi iconv) 178 set(PLATFORM_LIBRARIES winmm ws2_32 psapi)
180 179
181 # WSAPoll functionality doesn't exist before WinNT 6.x (Vista and up) 180 # WSAPoll functionality doesn't exist before WinNT 6.x (Vista and up)
182 add_definitions(-D_WIN32_WINNT=0x0600) 181 add_definitions(-D_WIN32_WINNT=0x0600)
@@ -186,6 +185,14 @@ ELSE()
186 set(PLATFORM_LIBRARIES rt) 185 set(PLATFORM_LIBRARIES rt)
187ENDIF (APPLE) 186ENDIF (APPLE)
188 187
188# MINGW: GCC does not support codecvt, so use iconv instead
189if (UNIX OR MINGW)
190 find_library(ICONV_LIBRARY NAMES iconv)
191 if (ICONV_LIBRARY)
192 list(APPEND PLATFORM_LIBRARIES ${ICONV_LIBRARY})
193 endif()
194endif()
195
189if (ENABLE_QT) 196if (ENABLE_QT)
190 if (CITRA_USE_BUNDLED_QT) 197 if (CITRA_USE_BUNDLED_QT)
191 if (MSVC14 AND ARCHITECTURE_x86_64) 198 if (MSVC14 AND ARCHITECTURE_x86_64)