From cc6f5020d8988c137f04eb22f45e70baa4c9465d Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 3 Jan 2021 15:09:01 +0100 Subject: [PATCH] Move conditional src files in meson.build Declare all the source files (including the platform-specific ones) at the beginning. --- app/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/meson.build b/app/meson.build index d031e5cc..651e756b 100644 --- a/app/meson.build +++ b/app/meson.build @@ -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()