add options for building targets

This commit is contained in:
jussi 2020-01-04 16:28:34 +02:00
parent 5fec2342ef
commit 658ffea9a7
3 changed files with 22 additions and 4 deletions

6
meson_options.txt Normal file
View File

@ -0,0 +1,6 @@
# By default, library and modules (except interfaces) are built
option('daemon', type: 'boolean', value: 'false', description: 'Build daemon')
option('modules', type: 'boolean', value: 'true', description: 'Build modules')
option('interfaces', type: 'boolean', value: 'false', description: 'Build interfaces')
option('library', type: 'boolean', value: 'true', description: 'Build library')

View File

@ -25,4 +25,11 @@ libtuxclocker = shared_library('libtuxclocker',
subdir('modules')
subdir('main')
subdir('lib')
if get_option('library')
subdir('lib')
endif
if get_option('daemon')
subdir('tuxclockerd')
endif

View File

@ -1,3 +1,8 @@
subdir('assignable')
subdir('interface')
subdir('readable')
if get_option('modules')
subdir('assignable')
subdir('readable')
endif
if get_option('interfaces')
subdir('interface')
endif