Configure and install thumbnailer

Currently the file "src/XDGData/FreeCAD.thumbnailer" gets installed, but
the associated freecad-thumbnailer script isn't. Install the script,
too.

While here, have the paths to the default icon and freecad-thumbnailer
script follow ${CMAKE_INSTALL_DATAROOTDIR} and ${CMAKE_INSTALL_BINDIR}
respectively.
This commit is contained in:
Johannes Thyssen Tishman
2025-03-19 18:03:29 +01:00
committed by Adrián Insaurralde Avalos
parent 2fe3631fd9
commit c8b1ea2836
4 changed files with 20 additions and 6 deletions

View File

@@ -30,7 +30,20 @@ install(
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/mime/packages
)
configure_file(
FreeCAD.thumbnailer.in
${CMAKE_BINARY_DIR}/FreeCAD.thumbnailer
)
install(
FILES FreeCAD.thumbnailer
FILES ${CMAKE_BINARY_DIR}/FreeCAD.thumbnailer
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/thumbnailers
)
configure_file(
${CMAKE_SOURCE_DIR}/src/Tools/freecad-thumbnailer.in
${CMAKE_BINARY_DIR}/freecad-thumbnailer
)
install(
PROGRAMS ${CMAKE_BINARY_DIR}/freecad-thumbnailer
TYPE BIN
)

View File

@@ -1,4 +0,0 @@
[Thumbnailer Entry]
TryExec=freecad-thumbnailer
Exec=freecad-thumbnailer -s %s %i %o
MimeType=application/x-extension-fcstd;

View File

@@ -0,0 +1,4 @@
[Thumbnailer Entry]
TryExec=@CMAKE_INSTALL_BINDIR@/freecad-thumbnailer
Exec=@CMAKE_INSTALL_BINDIR@/freecad-thumbnailer -s %s %i %o
MimeType=application/x-extension-fcstd;