project('Pong', ['cpp', 'c'])
add_global_arguments('-g', '-Wall', '-pedantic', '-Wno-unused-function', '-Werror', language : ['cpp', 'c'])

raylib = dependency('raylib', native: true)
static_lib_path = ''

if meson.is_cross_build()
	add_project_link_arguments('-L /usr/x86_64-w64-mingw32/lib/', '-lws2_32', '-lwinmm', '-I/usr/x86_64-w64-mingw32/include', language: ['c', 'cpp'])
	raylib = declare_dependency(
		link_args: ['-lraylib'],
		include_directories: include_directories('/usr/x86_64-w64-mingw32/include/'))
endif

executable('pong', 
	'main.cpp', 'easysock.cpp', 'sock.cpp','paddle.cpp', 'ball.cpp', 'numeric_base.cpp', 'connect_code.cpp', 'server.cpp', 'client.cpp',
	'serialization.c',
	dependencies: raylib,
)
