meson: only update-icon-cache when the demos are built
authorBilal Elmoussaoui <bil.elmoussaoui@gmail.com>
Sun, 9 Jan 2022 07:27:59 +0000 (07:27 +0000)
committerBilal Elmoussaoui <bil.elmoussaoui@gmail.com>
Sun, 9 Jan 2022 07:27:59 +0000 (07:27 +0000)
Without building the demos, nothing gets installed into $prefix/share/icons/hicolor. Which makes running
`gtk4-update-icon-cache` on the machine causes an error. This is easily reproducible on a Windows machine with MSVC where
there is nothing pre-installed on hicolor icon theme and that makes building gtk without the demos fails with "No such file or directory".

meson.build

index f47c164bf03a4c5409c61f90971ccd0dd15ba8f2..90619713d52de7524e580a172ef55ea0d360efcc 100644 (file)
@@ -897,7 +897,7 @@ if not meson.is_cross_build()
     gnome.post_install(
       glib_compile_schemas: true,
       gio_querymodules: gio_module_dirs,
-      gtk_update_icon_cache: true,
+      gtk_update_icon_cache: get_option('demos'),
     )
   else
     meson.add_install_script('build-aux/meson/post-install.py',