project('sok', 'c', default_options: ['c_std=c11']) # find libm (used for SDL version) cc = meson.get_compiler('c') libm = cc.find_library('m', required: true) sources = [ 'src/libsok/sok-level-parser.c', 'src/libsok/sok-ctx.c', 'src/libsok/sok-ctx-hash.c', 'src/libsok/sok-cache.c', 'src/libsok/sok-solve.c', ] # text exe executable('sok-text', sources + [ 'src/text/main.c', 'src/text/levels.c', 'src/text/action.c', 'src/text/draw.c', ], dependencies: []) # sdl exe executable('sok-sdl', sources + [ 'src/text/levels.c', 'src/sdl/warp-buf.c', 'src/sdl/color.c', 'src/sdl/action.c', 'src/sdl/sprites.c', 'src/sdl/draw.c', 'src/sdl/main.c', ], dependencies: [ dependency('SDL2'), libm, ]) # sprite-packer exe executable('sprite-packer', sources + [ 'src/sprite-packer/main.c', ], dependencies: [ dependency('SDL2'), libm, ]) # test executable test_solve = executable('test-solve', sources + [ 'src/text/levels.c', 'src/test-solve/main.c', ], dependencies: []) # generate solve tests foreach i: [0, 3, 4, 11, 18, 23] # long tests: 14, 17, 22, 26 test('level @0@'.format(i), test_solve, args: [ '@0@'.format(i), ]) endforeach