Fix Qt5::WindowsIntegrationPlugin being included on non-windows platforms

This commit is contained in:
Phillip Stephens 2021-02-26 15:12:44 -08:00
parent cb2d826cbd
commit 92fe1a9577
1 changed files with 124 additions and 117 deletions

View File

@ -89,21 +89,28 @@ if(Qt6Widgets_FOUND)
Qt6::Network Qt6::Network
Qt6::Widgets Qt6::Widgets
Qt6::Xml) Qt6::Xml)
set(QT5_WINDOWS_INTEGRATION_PLUGIN "")
else () else ()
set(Qt_LIBS set(Qt_LIBS
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network
Qt5::Widgets Qt5::Widgets
Qt5::Xml Qt5::Xml)
if (WIN32)
set(QT5_WINDOWS_INTEGRATION_PLUGIN
Qt5::WindowsIntegrationPlugin) Qt5::WindowsIntegrationPlugin)
else ()
set(QT5_WINDOWS_INTEGRATION_PLUGIN "")
endif ()
endif () endif ()
target_link_libraries(hecl-gui PRIVATE target_link_libraries(hecl-gui PRIVATE
${Qt_LIBS} ${Qt_LIBS}
hecl-light hecl-light
zeus zeus
QuaZip::QuaZip QuaZip::QuaZip
) ${QT5_WINDOWS_INTEGRATION_PLUGIN})
target_include_directories(hecl-gui PRIVATE quazip/quazip) target_include_directories(hecl-gui PRIVATE quazip/quazip)
target_compile_definitions(hecl-gui PRIVATE QUAZIP_STATIC=1) target_compile_definitions(hecl-gui PRIVATE QUAZIP_STATIC=1)