From 8dbb1676b72f4f88dc7967c7d9f6f4802576bcfa Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 8 Jan 2021 19:13:53 +0100 Subject: [PATCH] Factorize meson compiler variable initialization --- app/meson.build | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/meson.build b/app/meson.build index 651e756b..8e77cb93 100644 --- a/app/meson.build +++ b/app/meson.build @@ -31,6 +31,8 @@ else src += [ 'src/sys/unix/process.c' ] endif +cc = meson.get_compiler('c') + if not get_option('crossbuild_windows') # native build @@ -44,8 +46,6 @@ if not get_option('crossbuild_windows') else # cross-compile mingw32 build (from Linux to Windows) - cc = meson.get_compiler('c') - prebuilt_sdl2 = meson.get_cross_property('prebuilt_sdl2') sdl2_bin_dir = meson.current_source_dir() + '/../prebuilt-deps/' + prebuilt_sdl2 + '/bin' sdl2_lib_dir = meson.current_source_dir() + '/../prebuilt-deps/' + prebuilt_sdl2 + '/lib' @@ -80,8 +80,6 @@ else endif -cc = meson.get_compiler('c') - if host_machine.system() == 'windows' dependencies += cc.find_library('ws2_32') endif