build: Add a "default" driver selection to exclude virtual drivers
We will not want to install virtual drivers by default, yet they should be inside the "all" category. So add a new "default" category and also a separate array for the future virtual drivers.
This commit is contained in:
parent
01ec1c5777
commit
ce9702571b
2 changed files with 10 additions and 3 deletions
|
@ -47,13 +47,20 @@ mathlib_dep = cc.find_library('m', required: false)
|
|||
|
||||
# Drivers
|
||||
drivers = get_option('drivers').split(',')
|
||||
all_drivers = [ 'upekts', 'upektc', 'upeksonly', 'vcom5s', 'uru4000', 'aes1610', 'aes1660', 'aes2501', 'aes2550', 'aes2660', 'aes3500', 'aes4000', 'vfs101', 'vfs301', 'vfs5011', 'upektc_img', 'etes603', 'vfs0050', 'elan' ]
|
||||
virtual_drivers = [ ]
|
||||
default_drivers = [ 'upekts', 'upektc', 'upeksonly', 'vcom5s', 'uru4000', 'aes1610', 'aes1660', 'aes2501', 'aes2550', 'aes2660', 'aes3500', 'aes4000', 'vfs101', 'vfs301', 'vfs5011', 'upektc_img', 'etes603', 'vfs0050', 'elan' ]
|
||||
primitive_drivers = [ 'upekts' ]
|
||||
|
||||
all_drivers = default_drivers + virtual_drivers
|
||||
|
||||
if drivers == [ 'all' ]
|
||||
drivers = all_drivers
|
||||
endif
|
||||
|
||||
if drivers == [ 'default' ]
|
||||
drivers = default_drivers
|
||||
endif
|
||||
|
||||
if drivers.length() == 0 or drivers[0] == ''
|
||||
error('Cannot build libfprint without drivers, please specify a valid value for the drivers option')
|
||||
endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
option('drivers',
|
||||
description: 'Drivers to integrate',
|
||||
description: 'Drivers to integrate, "default" selects the default set, "all" selects all drivers',
|
||||
type: 'string',
|
||||
value: 'all')
|
||||
value: 'default')
|
||||
option('udev_rules',
|
||||
description: 'Whether to create a udev rules file',
|
||||
type: 'boolean',
|
||||
|
|
Loading…
Reference in a new issue