]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Qt6: fix Qt5 builds [3]
authortobtoht <thotbot@protonmail.com>
Tue, 24 May 2022 16:27:48 +0000 (18:27 +0200)
committertobtoht <thotbot@protonmail.com>
Tue, 24 May 2022 16:28:10 +0000 (18:28 +0200)
src/CMakeLists.txt

index e3ed169761618da86f8f6bb62150dda99bfd7c92..651b96330a8ec17dac1eaea125691de6bbd86bae 100644 (file)
@@ -252,7 +252,6 @@ target_link_libraries(feather
         Qt::Gui
         Qt::Network
         Qt::Svg
-        Qt::SvgWidgets
         Qt::Xml
         Qt::WebSockets
         ${ICU_LIBRARIES}
@@ -266,6 +265,10 @@ target_link_libraries(feather
         SingleApplication::SingleApplication
         )
 
+if(Qt6_FOUND)
+    target_link_libraries(feather Qt::SvgWidgets)
+endif()
+
 if(DEVICE_TREZOR_READY)
     target_link_libraries(feather ${TREZOR_DEP_LIBS})
 endif()
@@ -279,20 +282,20 @@ endif()
 
 if(NOT APPLE AND NOT Qt6_FOUND)
     target_link_libraries(feather
-            Qt::QSvgIconPlugin
-            Qt::QSvgPlugin
+            Qt5::QSvgIconPlugin
+            Qt5::QSvgPlugin
     )
 endif()
 
-if(STATIC)
+if(STATIC AND NOT Qt6_FOUND)
     if(NOT Qt6_FOUND)
     target_link_libraries(feather
-            Qt::QSvgIconPlugin
-            Qt::QSvgPlugin)
+            Qt5::QSvgIconPlugin
+            Qt5::QSvgPlugin)
     endif()
     if(UNIX AND NOT APPLE)
         target_link_libraries(feather
-            Qt::QXcbIntegrationPlugin)
+            Qt5::QXcbIntegrationPlugin)
     endif()
 endif()