Added build options to turn on/off all built in modes
This commit is contained in:
		
							
								
								
									
										41
									
								
								meson.build
									
									
									
									
									
								
							
							
						
						
									
										41
									
								
								meson.build
									
									
									
									
									
								
							| @@ -3,7 +3,6 @@ cc = meson.get_compiler('c') | ||||
|  | ||||
| inc = include_directories('inc') | ||||
| gtk = dependency('gtk+-3.0') | ||||
| gio = dependency('gio-unix-2.0') | ||||
| threads = dependency('threads') | ||||
| wayland = dependency('wayland-client') | ||||
| dl = cc.find_library('dl') | ||||
| @@ -19,17 +18,29 @@ endif | ||||
| add_project_arguments('-D_GNU_SOURCE', '-DVERSION="' + version + '"', language : 'c') | ||||
| add_project_link_arguments('-rdynamic', language : 'c') | ||||
|  | ||||
| executable(meson.project_name(), | ||||
| 'src/config.c', | ||||
| 'src/main.c', | ||||
| 'src/map.c', | ||||
| 'src/property_box.c', | ||||
| 'src/utils.c', | ||||
| 'src/wofi.c', | ||||
| 'modes/dmenu.c', | ||||
| 'modes/drun.c', | ||||
| 'modes/run.c', | ||||
| 'proto/wlr-layer-shell-unstable-v1-protocol.c', | ||||
| 'proto/xdg-shell-protocol.c', | ||||
| include_directories : inc, | ||||
| dependencies : [gtk, gio, threads, wayland, dl], install : true) | ||||
| sources = ['src/config.c', | ||||
| 			'src/main.c', | ||||
| 			'src/map.c', | ||||
| 			'src/property_box.c', | ||||
| 			'src/utils.c', | ||||
| 			'src/wofi.c', | ||||
| 			'proto/wlr-layer-shell-unstable-v1-protocol.c', | ||||
| 			'proto/xdg-shell-protocol.c'] | ||||
| 			 | ||||
| deps = [gtk, threads, wayland, dl] | ||||
| 			 | ||||
| if get_option('enable_run') | ||||
| 	sources += ['modes/run.c'] | ||||
| endif | ||||
|  | ||||
| if get_option('enable_drun') | ||||
| 	gio = dependency('gio-unix-2.0') | ||||
| 	sources += ['modes/drun.c'] | ||||
| 	deps += [gio] | ||||
| endif | ||||
|  | ||||
| if get_option('enable_dmenu') | ||||
| 	sources += ['modes/dmenu.c'] | ||||
| endif | ||||
|  | ||||
| executable(meson.project_name(), sources, include_directories : inc, dependencies : deps, install : true) | ||||
|   | ||||
| @@ -1 +1,4 @@ | ||||
| option('version', type : 'string', value : 'hg', description : 'The version to use if mercurial cannot be found') | ||||
| option('enable_run', type : 'boolean', value : true, description : 'Whether run mode should be enabled') | ||||
| option('enable_drun', type : 'boolean', value : true, description : 'Whether drun mode should be enabled') | ||||
| option('enable_dmenu', type : 'boolean', value : true, description : 'Whether dmenu mode should be enabled') | ||||
		Reference in New Issue
	
	Block a user
	 Scoopta
					Scoopta