--- src/Gui/CMakeLists.txt.orig	2026-06-22 10:15:48 UTC
+++ src/Gui/CMakeLists.txt
@@ -116,7 +116,7 @@ else(MSVC)
         FreeCADApp
         libfastsignals
         ${Boost_LIBRARIES}
-        ${OPENGL_gl_LIBRARY}
+        ${OPENGL_gl_LIBRARY} -L${CMAKE_INSTALL_PREFIX}/lib
         ${3DCONNEXION_LINKFLAGS}
     )
 endif(MSVC)
@@ -1521,13 +1521,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
