Merge pull request #8 from henriquegemignani/bugfix/qt-windows-runtime

Fix linking to Qt5::QWindowsIntegrationPlugin for Windows
This commit is contained in:
Luke Street 2021-04-02 13:05:18 -04:00 committed by GitHub
commit 234981aa7f
1 changed files with 5 additions and 2 deletions

View File

@ -96,8 +96,11 @@ else ()
Qt5::Widgets
Qt5::Xml)
# Check for static linking
if (WIN32 AND NOT "$<TARGET_PROPERTY:hecl-gui,MSVC_RUNTIME_LIBRARY>" MATCHES "DLL$")
list(APPEND Qt_LIBS Qt5::QWindowsIntegrationPlugin)
if (WIN32)
get_target_property(HECL_RUNTIME_LIBRARY hecl-gui MSVC_RUNTIME_LIBRARY)
if (NOT "${HECL_RUNTIME_LIBRARY}" MATCHES "DLL$")
list(APPEND Qt_LIBS Qt5::QWindowsIntegrationPlugin)
endif ()
endif ()
endif ()
target_link_libraries(hecl-gui PRIVATE