diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-05-05 12:51:25 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-05-05 12:51:25 +0100 |
| commit | d0f97926e80482d9cbb3679165a09ca6e695f83f (patch) | |
| tree | 572ca03c7493307373a413679245241d6e7ff7f8 | |
| parent | 63346a8ceac9ac1061e59af2a99ab1a44c851392 (diff) | |
| download | puzzles-d0f97926e80482d9cbb3679165a09ca6e695f83f.zip puzzles-d0f97926e80482d9cbb3679165a09ca6e695f83f.tar.gz puzzles-d0f97926e80482d9cbb3679165a09ca6e695f83f.tar.bz2 puzzles-d0f97926e80482d9cbb3679165a09ca6e695f83f.tar.xz | |
Isolate icons build from the running user's preferences.
Preferences that adjust the display, such as Pearl graphics style or
Light Up lit-blobs toggling, shouldn't affect the official icons, even
if a ~/.config/sgt-puzzles exists in the account that builds the
puzzles.
| -rw-r--r-- | icons/icons.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/icons/icons.cmake b/icons/icons.cmake index 2795a29..2c4902b 100644 --- a/icons/icons.cmake +++ b/icons/icons.cmake @@ -97,6 +97,10 @@ set(border_16 1) set(icon_srcdir ${CMAKE_SOURCE_DIR}/icons) set(icon_bindir ${CMAKE_BINARY_DIR}/icons) +# We'll need to point $SGT_PUZZLES_DIR at an empty directory, to avoid +# the icons reflecting the building user's display preferences. +set(empty_config_dir ${CMAKE_BINARY_DIR}/icons/config) + function(build_icon name) set(output_icon_files) @@ -118,7 +122,10 @@ function(build_icon name) set(redo_arg) endif() add_custom_command(OUTPUT ${icon_bindir}/${name}-base.png - COMMAND ${CMAKE_COMMAND} -E env ASAN_OPTIONS=detect_leaks=0 + COMMAND ${CMAKE_COMMAND} -E make_directory ${empty_config_dir} + COMMAND ${CMAKE_COMMAND} -E env + ASAN_OPTIONS=detect_leaks=0 + SGT_PUZZLES_DIR=${empty_config_dir} ${icon_bindir}/${name}-icon-maker ${redo_arg} --screenshot ${icon_bindir}/${name}-base.png |