From 49ba8b03c4ebab4a28fa75cfb64694f84816b8ed Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 15 Jan 2019 14:36:25 -0500 Subject: add src/msi/ and sok.msi custom target --- meson.build | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index d9dca9d..0f515f2 100644 --- a/meson.build +++ b/meson.build @@ -1,9 +1,15 @@ project('sok', 'c', default_options: ['c_std=c11']) +# MSI settings +MSI_SDL_LIB_DIR = '/usr/local/x86_64-w64-mingw32/bin' + # find libm (used for SDL version) cc = meson.get_compiler('c') libm = cc.find_library('m', required: true) +# find wixl (used for windows version) +wixl = find_program('wixl', native: true, disabler: true) + # core source (shared across all applications) sources = [ 'src/core/sok-level-parser.c', @@ -16,13 +22,12 @@ sources = [ # text UI executable('text', sources + [ 'src/levels/levels.c', - 'src/text/main.c', - 'src/text/action.c', + 'src/text/main.c', 'src/text/action.c', 'src/text/draw.c', ], dependencies: []) # sdl (main) exe -executable('sok', sources + [ +sok_exe = executable('sok', sources + [ 'src/levels/levels.c', 'src/sdl/warp-buf.c', 'src/sdl/color.c', @@ -41,6 +46,19 @@ executable('sok', sources + [ libm, ]) +# sok.msi +custom_target('msi', + input: 'src/msi/sok.wxs', + output: 'sok.msi', + command: [ + wixl, + '-o', '@OUTPUT@', + '-D', 'BUILD_DIR=.', + '-D', 'SDL_LIB_DIR=' + MSI_SDL_LIB_DIR, + '@INPUT@', + ] +) + # sprite-packer exe executable('sprite-packer', [ 'src/sprite-packer/main.c', -- cgit v1.2.3