Fix noconsole.exe
The linker flag "-mwindows" has no effect on my current MinGW.
Instead, passing "-Wl,--subsystem,windows" works.
Fixes <https://github.com/Genymobile/scrcpy/issues/691>
@@ -123,10 +123,8 @@ configure_file(configuration: conf, output: 'config.h')
src_dir = include_directories('src')
if get_option('windows_noconsole')
- c_args = [ '-mwindows' ]
- link_args = [ '-mwindows' ]
+ link_args = [ '-Wl,--subsystem,windows' ]
else
- c_args = []
link_args = []
endif
@@ -134,7 +132,7 @@ executable('scrcpy', src,
dependencies: dependencies,
include_directories: src_dir,
install: true,
- c_args: c_args,
+ c_args: [],
link_args: link_args)
install_man('scrcpy.1')
