aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2021-03-31 18:44:44 +0100
committerSimon Tatham <anakin@pobox.com>2021-03-31 18:44:44 +0100
commitb05a975feeef0abfa5dd38837217b8717e0e7539 (patch)
tree719c4e4517f169f9e1003546c506f99c30209792
parent71c66b6fbd965a891bdf6546e4d0571da018db8b (diff)
downloadpuzzles-b05a975feeef0abfa5dd38837217b8717e0e7539.zip
puzzles-b05a975feeef0abfa5dd38837217b8717e0e7539.tar.gz
puzzles-b05a975feeef0abfa5dd38837217b8717e0e7539.tar.bz2
puzzles-b05a975feeef0abfa5dd38837217b8717e0e7539.tar.xz
Make the icons build step optional.
This way, ImageMagick is no longer a hard build dependency. For developers or users, building puzzles without nice icons is preferable to not building them at all. (Also, thanks to Michael Quevillon for pointing out very promptly that my use of 'REQUIRED' in the find_program command was implicitly depending on a version of CMake in advance of my minimum_required specification. This change fixes that too, in passing.)
-rw-r--r--icons/icons.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/icons/icons.cmake b/icons/icons.cmake
index 5bd9285..873c3c7 100644
--- a/icons/icons.cmake
+++ b/icons/icons.cmake
@@ -4,8 +4,13 @@ if(NOT build_icons)
return()
endif()
-find_program(CONVERT convert REQUIRED)
-find_program(IDENTIFY identify REQUIRED)
+find_program(CONVERT convert)
+find_program(IDENTIFY identify)
+if(NOT CONVERT OR NOT IDENTIFY)
+ message(WARNING "Puzzle icons cannot be rebuilt (did not find ImageMagick)")
+ set(build_icons FALSE)
+ return()
+endif()
# For puzzles which have animated moves, it's nice to show the sample
# image part way through the animation of a move. This setting will