meson: relocate add_project_arguments() for IS_WINDOWS
Change-Id: I6afb65fabf858449f2706bf250588225a94c1871
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/63827
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Original-Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72330
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/meson.build b/meson.build
index 0151ef2..5365d2c 100644
--- a/meson.build
+++ b/meson.build
@@ -36,12 +36,6 @@
add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19
add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : 'c')
-if host_machine.system() in ['cygwin', 'windows']
- add_project_arguments('-DIS_WINDOWS=1', language : 'c')
-else
- add_project_arguments('-DIS_WINDOWS=0', language : 'c')
-endif
-
# get defaults from configure
config_atahpt = get_option('config_atahpt')
config_atapromise = get_option('config_atapromise')
@@ -170,6 +164,11 @@
if cc.check_header('sys/utsname.h')
add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
endif
+if host_machine.system() in ['cygwin', 'windows']
+ add_project_arguments('-DIS_WINDOWS=1', language : 'c')
+else
+ add_project_arguments('-DIS_WINDOWS=0', language : 'c')
+endif
srcs += 'platform/memaccess.c'