install(TARGETS lemon RUNTIME DESTINATION bin)

include(GNUInstallDirs)

set(LEMON_LINUX_ICON_DIMENSIONS 16 22 24 32 36 44 48 64 72 96 128 150 192 256 310 512 1024)
install(FILES assets/lemon-lime.metainfo.xml.in DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo" RENAME lemon-lime.metainfo.xml)
install(FILES assets/x-lemon-contest.xml.in DESTINATION "${CMAKE_INSTALL_DATADIR}/mime/application" RENAME x-lemon-contest.xml)
install(FILES assets/lemon-lime.desktop.in DESTINATION "${CMAKE_INSTALL_DATADIR}/applications" RENAME lemon-lime.desktop)
#install(FILES assets/icons/lemon-lime.svg DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps")
foreach(LEMON_LINUX_ICON_DIMENSION ${LEMON_LINUX_ICON_DIMENSIONS})
	install(FILES assets/icons/lemon-lime.${LEMON_LINUX_ICON_DIMENSION}.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${LEMON_LINUX_ICON_DIMENSION}x${LEMON_LINUX_ICON_DIMENSION}/apps" RENAME lemon-lime.png)
endforeach(LEMON_LINUX_ICON_DIMENSION)
if(NOT EMBED_TRANSLATIONS)
    install(FILES ${QM_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/lemon-lime/lang")
endif()
if(NOT EMBED_DOCS)
    install(FILES manual/llmanual.pdf DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/lemon-lime")
endif()
install(FILES assets/Testlib-for-Lemons/testlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} RENAME testlib_for_lemons.h)
