Move conditional src files in meson.build
Declare all the source files (including the platform-specific ones) at the beginning.
This commit is contained in:
parent
4bd9da4c93
commit
cc6f5020d8
1 changed files with 6 additions and 3 deletions
|
@ -25,6 +25,12 @@ src = [
|
|||
'src/util/str_util.c'
|
||||
]
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
src += [ 'src/sys/win/process.c' ]
|
||||
else
|
||||
src += [ 'src/sys/unix/process.c' ]
|
||||
endif
|
||||
|
||||
if not get_option('crossbuild_windows')
|
||||
|
||||
# native build
|
||||
|
@ -77,10 +83,7 @@ endif
|
|||
cc = meson.get_compiler('c')
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
src += [ 'src/sys/win/process.c' ]
|
||||
dependencies += cc.find_library('ws2_32')
|
||||
else
|
||||
src += [ 'src/sys/unix/process.c' ]
|
||||
endif
|
||||
|
||||
conf = configuration_data()
|
||||
|
|
Loading…
Reference in a new issue