--- src/Gui/CMakeLists.txt.orig	2025-09-10 18:14:29 UTC
+++ src/Gui/CMakeLists.txt
@@ -107,7 +107,7 @@ else(MSVC)
     set(FreeCADGui_LIBS
         FreeCADApp
         ${Boost_LIBRARIES}
-        ${OPENGL_gl_LIBRARY}
+        ${OPENGL_gl_LIBRARY} -L${CMAKE_INSTALL_PREFIX}/lib
         ${3DCONNEXION_LINKFLAGS}
     )
 endif(MSVC)
@@ -1528,13 +1528,13 @@ else(WIN32)
     INSTALL(TARGETS FreeCADGui
         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     )
-    INSTALL(FILES Icons/freecad-icon-16.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps RENAME org.freecad.FreeCAD.png)
-    INSTALL(FILES Icons/freecad-icon-32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps RENAME org.freecad.FreeCAD.png)
-    INSTALL(FILES Icons/freecad-icon-48.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps RENAME org.freecad.FreeCAD.png)
-    INSTALL(FILES Icons/freecad-icon-64.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps RENAME org.freecad.FreeCAD.png)
-    INSTALL(FILES Icons/freecad.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps RENAME org.freecad.FreeCAD.svg)
-    INSTALL(FILES Icons/freecad.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
-    INSTALL(FILES Icons/freecad-doc.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/mimetypes RENAME application-x-extension-fcstd.svg)
+    INSTALL(FILES Icons/freecad-icon-16.png DESTINATION ${XDG_DATADIR}/icons/hicolor/16x16/apps RENAME org.freecad.FreeCAD.png)
+    INSTALL(FILES Icons/freecad-icon-32.png DESTINATION ${XDG_DATADIR}/icons/hicolor/32x32/apps RENAME org.freecad.FreeCAD.png)
+    INSTALL(FILES Icons/freecad-icon-48.png DESTINATION ${XDG_DATADIR}/icons/hicolor/48x48/apps RENAME org.freecad.FreeCAD.png)
+    INSTALL(FILES Icons/freecad-icon-64.png DESTINATION ${XDG_DATADIR}/icons/hicolor/64x64/apps RENAME org.freecad.FreeCAD.png)
+    INSTALL(FILES Icons/freecad.svg DESTINATION ${XDG_DATADIR}/icons/hicolor/scalable/apps RENAME org.freecad.FreeCAD.svg)
+    INSTALL(FILES Icons/freecad.svg DESTINATION ${XDG_DATADIR}/pixmaps)
+    INSTALL(FILES Icons/freecad-doc.svg DESTINATION ${XDG_DATADIR}/icons/hicolor/scalable/mimetypes RENAME application-x-extension-fcstd.svg)
 endif(WIN32)
 
 set(FreeCADGui_Scripts
