Skip to content

Commit

Permalink
Factorize meson compiler variable initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1v committed Jan 17, 2021
1 parent ab912c2 commit 8dbb167
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -80,8 +80,6 @@ else

endif

cc = meson.get_compiler('c')

if host_machine.system() == 'windows'
dependencies += cc.find_library('ws2_32')
endif
Expand Down

0 comments on commit 8dbb167

Please sign in to comment.