« Prev 4.2.7 Custom Configuration Checks | Table of Contents | Next » 4.3 Building Targets |
:fail
If the :fail
option is set to false
, then the absence of the package or
program requested will not result in the configure option failing.
The :fail
option defaults to true
if the :set_define
option is not
defined, and defaults to false
if the :set_define
option is defined.
:on_fail
The :on_fail
option can be set to a String or a Proc object. If the
configuration operation fails (or would fail), the given message is printed
or the Proc is called.
Examples:
configure do check_c_compiler "special-gcc", on_fail: "First install special gcc!" end configure do package_hint = lambda do puts "The following packages must be installed to build this project:" puts "- libsdl2-dev" puts "- libsdl2-image-dev" puts "- libsdl2-net-dev" end check_lib "SDL2", on_fail: package_hint check_lib "SDL2_image", on_fail: package_hint check_lib "SDL2_net", on_fail: package_hint end
:set_define
If set, a build define of the specified String will be added to the
CPPDEFINES
construction variable array if the requested package is found.
« Prev 4.2.7 Custom Configuration Checks | Table of Contents | Next » 4.3 Building Targets |