diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-10-27 19:54:02 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-10-27 19:54:02 +0200 |
commit | 9aa26e2807ed3aebf336139067069e55582a6d6e (patch) | |
tree | 5da1fd1bfa8d394bb15ec51535e560da5477967b /CMakeLists.txt | |
parent | f7528a05a3050046254c8c8052f7ca0fb5699c67 (diff) | |
download | tdv-9aa26e2807ed3aebf336139067069e55582a6d6e.tar.gz tdv-9aa26e2807ed3aebf336139067069e55582a6d6e.tar.xz tdv-9aa26e2807ed3aebf336139067069e55582a6d6e.zip |
CMakeLists.txt: think of older versions
At minimum it documents the novelty of the command argument.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 75d699d..25981b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,13 +187,17 @@ if (NOT WIN32) endif (NOT WIN32) # The same for the alternative GTK+ UI +if (NOT ${CMAKE_VERSION} VERSION_LESS 3.18.0) + set (find_program_REQUIRE REQUIRED) +endif () + function (icon_to_png svg size output_dir output) set (_dimensions ${size}x${size}) set (_png_path ${output_dir}/hicolor/${_dimensions}/apps) set (_png ${_png_path}/sdgui.png) set (${output} ${_png} PARENT_SCOPE) - find_program (rsvg_convert_EXECUTABLE rsvg-convert REQUIRED) + find_program (rsvg_convert_EXECUTABLE rsvg-convert ${find_program_REQUIRE}) add_custom_command (OUTPUT ${_png} COMMAND ${CMAKE_COMMAND} -E make_directory ${_png_path} COMMAND ${rsvg_convert_EXECUTABLE} --output=${_png} @@ -203,7 +207,7 @@ function (icon_to_png svg size output_dir output) endfunction () function (icon_for_win32 pngs ico) - find_program (icotool_EXECUTABLE icotool REQUIRED) + find_program (icotool_EXECUTABLE icotool ${find_program_REQUIRE}) add_custom_command (OUTPUT ${ico} COMMAND ${icotool_EXECUTABLE} -c -o ${ico} ${pngs} DEPENDS ${pngs} |