12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- project('cubes plus plus', 'cpp')
- src_common = [
- ]
- src_server = [
- 'server/Main.cpp',
- 'raw-terminal/Console.c',
- 'server/snuviscript/Snuvi.cpp',
- ]
- src_client = [
- 'client/Main.cpp',
- 'client/Controls.cpp',
- 'client/Network.cpp',
- 'client/World.cpp',
- 'client/Player.cpp',
- 'client/FontRenderer.cpp',
- 'client/Chat.cpp',
- ]
- sources_test = ['tests/Main.cpp']
- compiler = meson.get_compiler('cpp')
- args = compiler.get_supported_arguments(['-Wall', '-Wextra', '-pedantic', '-Werror', '-DLOG_LEVEL=4'])
- gamingcore_proj = subproject('gaming-core')
- gamingcore_dep = gamingcore_proj.get_variable('gamingcore_dep')
- common = static_library('common',
- sources: src_common,
- dependencies: [gamingcore_dep],
- cpp_args: args)
- common_dep = declare_dependency(
- link_with: common,
- include_directories: gamingcore_proj.get_variable('gamingcore_include'))
- if host_machine.system() == 'linux'
- liblonelytiger_proj = subproject('lonely-tiger')
- liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
- executable('game_server',
- sources: src_server,
- dependencies: [liblonelytiger_dep, common_dep],
- cpp_args: args)
- endif
-
- executable('game_tests',
- sources: sources_test,
- cpp_args: args)
-
- executable('game_client',
- sources: src_client,
- dependencies : common_dep,
- cpp_args: args)
|