diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d616f2d51..5d6e16ec2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -169,3 +169,24 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} + + meson: + strategy: + fail-fast: false + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Get dependencies + run: | + sudo apt-get -y update && sudo apt-get -y upgrade + sudo mk/linux/setupBuildDeps.sh + sudo apt-get install -y meson + # Using pip is only required if a newer version of meson is required + # sudo apt-get install -y python3-pip python3-setuptools # required for pip + # sudo -H python3 -m pip install meson ninja # version included w + - name: Build + run: | + meson setup builddir + cd builddir + meson compile -v + diff --git a/meson.build b/meson.build index 2eedb3d3f..506d2b39c 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'MegaGlest', ['c', 'cpp'], version: '3.13.0.999', - meson_version : '>= 0.56.0', + meson_version : '>= 0.53.2', default_options: ['warning_level=0'] ) @@ -32,7 +32,7 @@ compiler = meson.get_compiler('cpp') # ], # language: 'cpp') -subdir('source/shared_lib') +subdir('source/shared_lib') #subdir('source/glest_game') diff --git a/source/shared_lib/meson.build b/source/shared_lib/meson.build index 5397b53d5..8bbc77cff 100644 --- a/source/shared_lib/meson.build +++ b/source/shared_lib/meson.build @@ -39,7 +39,19 @@ dep_curl = dependency('libcurl') dep_sdl = dependency('sdl2') dep_x11 = dependency('x11') dep_openal = dependency('openal') -dep_lua = dependency('lua') + +# Using simply 'lua' doesn't work on all Linux distributions +# See https://github.com/mesonbuild/meson/issues/4553 for more info +foreach name : ['lua', 'lua5.3', 'lua-5.3', 'lua53'] + dep_lua = dependency(name, version: '>=5.3', required: false) + if dep_lua.found() + break + endif +endforeach +if not dep_lua.found() + error('Lua could not be found!') +endif + dep_cppunit = dependency('cppunit') dep_fribidi = dependency('fribidi') dep_glib = dependency('glib-2.0') @@ -77,7 +89,7 @@ dep_glib = dependency('glib-2.0') #-lGLEW #-lminiupnpc #-lircclient -#-lSDL2main +#-lSDL2main #-lfribidi #-lglib-2.0