Qt: Fix static compilation in MinGW (fixes #1769)

This commit is contained in:
Vicki Pfau 2020-06-01 20:07:28 -07:00
parent 5e5627db54
commit 57ad735280
2 changed files with 5 additions and 1 deletions

View File

@ -39,6 +39,7 @@ Other fixes:
- Debugger: Don't skip undefined instructions when debugger attached
- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
- Qt: Fix OpenGL 2.1 support (fixes mgba.io/i/1678)
- Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
Misc:
- 3DS: Clean up legacy initialization (fixes mgba.io/i/1768)
- Debugger: Keep track of global cycle count

View File

@ -289,7 +289,10 @@ endif()
if(QT_STATIC)
find_library(QTPCRE NAMES qtpcre2 qtpcre)
if(WIN32)
list(APPEND QT_LIBRARIES qwindows dwmapi imm32 uxtheme Qt5EventDispatcherSupport Qt5FontDatabaseSupport Qt5ThemeSupport Qt5WindowsUIAutomationSupport)
if(CMAKE_CROSSCOMPILING)
set(QWINDOWS_DEPS Qt5EventDispatcherSupport Qt5FontDatabaseSupport Qt5ThemeSupport Qt5WindowsUIAutomationSupport)
endif()
list(APPEND QT_LIBRARIES Qt5::QWindowsIntegrationPlugin ${QWINDOWS_DEPS} dwmapi uxtheme imm32 -static-libgcc -static-libstdc++)
set_target_properties(Qt5::Core PROPERTIES INTERFACE_LINK_LIBRARIES "${QTPCRE};version;winmm;ssl;crypto;ws2_32;iphlpapi;crypt32;userenv;netapi32;wtsapi32")
set_target_properties(Qt5::Gui PROPERTIES INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY})
elseif(APPLE)