Skip to content

Commit

Permalink
[bugfix] check for librsvg and imagemagick before building the icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nikp123 committed Jul 10, 2024
1 parent f6d00ca commit e1d52fa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/cmake/install_and_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@ find_and_copy_dlls(xava)
include("src/cmake/copy_gl_shaders.cmake")

if(UNIX AND NOT APPLE)
# I am lazy and I just want to convert the icons into a format most desktops will be fine with
find_program(CONVERT magick
REQUIRED)

# Despite the program not being called, we need it because it's called by magick
find_program(LIBRSVG rsvg-convert
REQUIRED)

execute_process (COMMAND
convert -size 128x128 -density 1200 -background none -format png32
"${CONVERT}" convert -size 128x128 -density 1200 -background none -format png32
"${CMAKE_CURRENT_SOURCE_DIR}/assets/linux/xava.svg"
"${CMAKE_CURRENT_BINARY_DIR}/xava.png")
"${CMAKE_CURRENT_BINARY_DIR}/xava.png"
COMMAND_ERROR_IS_FATAL ANY)
install (FILES assets/linux/xava.desktop DESTINATION share/applications)
install (FILES assets/linux/xava.svg RENAME xava_visualizer.svg DESTINATION share/icons/hicolor/scalable/apps)
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/xava.png" RENAME xava_visualizer.png DESTINATION share/icons/hicolor/128x128/apps)
Expand Down

0 comments on commit e1d52fa

Please sign in to comment.