Files
create/src/XDGData/CMakeLists.txt
Rafael Villar Burke e0c3237d6c Fix thumbnailing
This fixes thumbnailing for XDG desktops. The new script doesn't depend on GNOME libs and works either with python3 or python2.
Also, a thumbnailer config file is added to the installation in CMakeList.txt
2020-11-24 17:47:40 +01:00

46 lines
1.3 KiB
CMake

include(GNUInstallDirs)
if(NOT DEFINED APPDATA_RELEASE_DATE)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(COMMAND git log -1 --pretty=%cd --date=short
OUTPUT_VARIABLE APPDATA_RELEASE_DATE
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
if(NOT (CMAKE_VERSION VERSION_LESS 3.8.0))
string(TIMESTAMP APPDATA_RELEASE_DATE "%Y-%m-%d")
else()
file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d")
endif()
endif()
endif()
configure_file(
org.freecadweb.FreeCAD.appdata.xml.in
${CMAKE_BINARY_DIR}/org.freecadweb.FreeCAD.appdata.xml
)
install(
FILES ${CMAKE_BINARY_DIR}/org.freecadweb.FreeCAD.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
)
install(
FILES org.freecadweb.FreeCAD.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
)
install(
FILES org.freecadweb.FreeCAD.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps
)
install(
FILES org.freecadweb.FreeCAD.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/mime/packages
)
install(
FILES FreeCAD.thumbnailer
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/thumbnailers
)