Add static build option
Use static dependencies if the option is set. PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
This commit is contained in:
parent
360936248c
commit
179c664e2b
@ -109,20 +109,22 @@ endif
|
|||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
static = get_option('static')
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
dependency('libavformat', version: '>= 57.33'),
|
dependency('libavformat', version: '>= 57.33', static: static),
|
||||||
dependency('libavcodec', version: '>= 57.37'),
|
dependency('libavcodec', version: '>= 57.37', static: static),
|
||||||
dependency('libavutil'),
|
dependency('libavutil', static: static),
|
||||||
dependency('libswresample'),
|
dependency('libswresample', static: static),
|
||||||
dependency('sdl2', version: '>= 2.0.5'),
|
dependency('sdl2', version: '>= 2.0.5', static: static),
|
||||||
]
|
]
|
||||||
|
|
||||||
if v4l2_support
|
if v4l2_support
|
||||||
dependencies += dependency('libavdevice')
|
dependencies += dependency('libavdevice', static: static)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if usb_support
|
if usb_support
|
||||||
dependencies += dependency('libusb-1.0')
|
dependencies += dependency('libusb-1.0', static: static)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
|
@ -2,6 +2,7 @@ option('compile_app', type: 'boolean', value: true, description: 'Build the clie
|
|||||||
option('compile_server', type: 'boolean', value: true, description: 'Build the server')
|
option('compile_server', type: 'boolean', value: true, description: 'Build the server')
|
||||||
option('prebuilt_server', type: 'string', description: 'Path of the prebuilt server')
|
option('prebuilt_server', type: 'string', description: 'Path of the prebuilt server')
|
||||||
option('portable', type: 'boolean', value: false, description: 'Use scrcpy-server from the same directory as the scrcpy executable')
|
option('portable', type: 'boolean', value: false, description: 'Use scrcpy-server from the same directory as the scrcpy executable')
|
||||||
|
option('static', type: 'boolean', value: false, description: 'Use static dependencies')
|
||||||
option('server_debugger', type: 'boolean', value: false, description: 'Run a server debugger and wait for a client to be attached')
|
option('server_debugger', type: 'boolean', value: false, description: 'Run a server debugger and wait for a client to be attached')
|
||||||
option('v4l2', type: 'boolean', value: true, description: 'Enable V4L2 feature when supported')
|
option('v4l2', type: 'boolean', value: true, description: 'Enable V4L2 feature when supported')
|
||||||
option('usb', type: 'boolean', value: true, description: 'Enable HID/OTG features when supported')
|
option('usb', type: 'boolean', value: true, description: 'Enable HID/OTG features when supported')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user