|
|
@ -3,19 +3,23 @@ add_global_arguments('-g', '-Wall', '-pedantic', '-Wno-unused-function', '-Wno-n
|
|
|
|
compiler = meson.get_compiler('cpp')
|
|
|
|
compiler = meson.get_compiler('cpp')
|
|
|
|
cmake = import('cmake')
|
|
|
|
cmake = import('cmake')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if we are building a shared library
|
|
|
|
if get_option('default_library') == 'shared'
|
|
|
|
if get_option('default_library') == 'shared'
|
|
|
|
raylib = dependency('raylib', required: false) # Try to find dependency with pkg-config
|
|
|
|
raylib = dependency('raylib', required: false) # Try to find dependency with pkg-config
|
|
|
|
if not raylib.found()
|
|
|
|
if not raylib.found()
|
|
|
|
raylib = compiler.find_library('raylib', has_headers: ['raylib.h', 'raymath.h'], required: true) # Try to manually search for the dependency
|
|
|
|
message('===========+RAYLIB NOT FOUND===============')
|
|
|
|
|
|
|
|
raylib = compiler.find_library('raylib', has_headers: ['raylib.h', 'raymath.h'], required: false) # Try to manually search for the dependency
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
# if not raylib.found()
|
|
|
|
if not raylib.found()
|
|
|
|
# opt_var = cmake.subproject_options()
|
|
|
|
opt_var = cmake.subproject_options()
|
|
|
|
# opt_var.add_cmake_defines({'BUILD_SHARED_LIBS' : true})
|
|
|
|
opt_var.add_cmake_defines({'BUILD_SHARED_LIBS' : true})
|
|
|
|
# opt_var.add_cmake_defines({'CMAKE_SKIP_RPATH' : true})
|
|
|
|
opt_var.add_cmake_defines({'CMAKE_SKIP_RPATH' : true})
|
|
|
|
# raylib_proj = cmake.subproject('raylib', options: opt_var)
|
|
|
|
raylib_proj = cmake.subproject('raylib', options: opt_var)
|
|
|
|
# raylib = raylib_proj.dependency('raylib')
|
|
|
|
raylib = raylib_proj.dependency('raylib')
|
|
|
|
# endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# I we are building a static library
|
|
|
|
if get_option('default_library') == 'static'
|
|
|
|
if get_option('default_library') == 'static'
|
|
|
|
raylib_proj = cmake.subproject('raylib')
|
|
|
|
raylib_proj = cmake.subproject('raylib')
|
|
|
|
raylib = raylib_proj.dependency('raylib')
|
|
|
|
raylib = raylib_proj.dependency('raylib')
|
|
|
@ -30,7 +34,7 @@ if build_machine.system() == 'windows'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
executable('pong',
|
|
|
|
executable('pong',
|
|
|
|
'main.cpp', 'easysock.cpp', 'sock.cpp','paddle.cpp', 'ball.cpp', 'numeric_base.cpp', 'connect_code.cpp', 'server.cpp', 'client.cpp',
|
|
|
|
'main.cpp', 'easysock.cpp', 'sock.cpp','paddle.cpp', 'ball.cpp', 'numeric_base.cpp', 'connect_code.cpp', 'server.cpp', 'client.cpp', 'check_input.cpp',
|
|
|
|
'serialization.c',
|
|
|
|
'serialization.c',
|
|
|
|
dependencies: [raylib, ws2_dep, winmm]
|
|
|
|
dependencies: [raylib, ws2_dep, winmm]
|
|
|
|
)
|
|
|
|
)
|
|
|
|