Now working on the new SFML with better audio.
This commit is contained in:
parent
2d81f900be
commit
c47e688b0b
15 changed files with 189 additions and 169 deletions
112
meson.build
112
meson.build
|
@ -1,5 +1,74 @@
|
|||
project('turings_tarpit', 'cpp',
|
||||
default_options: ['cpp_std=c++20'])
|
||||
# clang might need _LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
|
||||
|
||||
project('turings-tarpit', 'cpp',
|
||||
version: '0.1.0',
|
||||
default_options: [
|
||||
'cpp_std=c++20',
|
||||
'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1',
|
||||
])
|
||||
|
||||
# use this for common options only for our executables
|
||||
cpp_args=[]
|
||||
link_args=[]
|
||||
# these are passed as override_defaults
|
||||
exe_defaults = [ 'warning_level=2' ]
|
||||
|
||||
cc = meson.get_compiler('cpp')
|
||||
dependencies = []
|
||||
|
||||
if build_machine.system() == 'windows'
|
||||
add_global_link_arguments(
|
||||
'-static-libgcc',
|
||||
'-static-libstdc++',
|
||||
'-static',
|
||||
language: 'cpp',
|
||||
)
|
||||
|
||||
sfml_main = dependency('sfml_main')
|
||||
opengl32 = cc.find_library('opengl32', required: true)
|
||||
winmm = cc.find_library('winmm', required: true)
|
||||
gdi32 = cc.find_library('gdi32', required: true)
|
||||
|
||||
dependencies += [
|
||||
opengl32, winmm, gdi32, sfml_main
|
||||
]
|
||||
exe_defaults += ['werror=true']
|
||||
|
||||
elif build_machine.system() == 'darwin'
|
||||
add_global_link_arguments(
|
||||
language: 'cpp',
|
||||
)
|
||||
|
||||
opengl = dependency('OpenGL')
|
||||
corefoundation = dependency('CoreFoundation')
|
||||
carbon = dependency('Carbon')
|
||||
cocoa = dependency('Cocoa')
|
||||
iokit = dependency('IOKit')
|
||||
corevideo = dependency('CoreVideo')
|
||||
|
||||
link_args += ['-ObjC']
|
||||
exe_defaults += ['werror=false']
|
||||
dependencies += [
|
||||
opengl, corefoundation, carbon, cocoa, iokit, corevideo
|
||||
]
|
||||
endif
|
||||
|
||||
catch2 = dependency('catch2-with-main')
|
||||
fmt = subproject('fmt').get_variable('fmt_dep')
|
||||
json = dependency('nlohmann_json')
|
||||
freetype2 = dependency('freetype2')
|
||||
|
||||
flac = dependency('flac')
|
||||
ogg = dependency('ogg')
|
||||
vorbis = dependency('vorbis')
|
||||
vorbisfile = dependency('vorbisfile')
|
||||
vorbisenc = dependency('vorbisenc')
|
||||
sfml_audio = dependency('sfml_audio')
|
||||
sfml_graphics = dependency('sfml_graphics')
|
||||
sfml_network = dependency('sfml_network')
|
||||
sfml_system = dependency('sfml_system')
|
||||
sfml_window = dependency('sfml_window',
|
||||
default_options: ['default_library=shared'])
|
||||
|
||||
cmake = import('cmake')
|
||||
opts = cmake.subproject_options()
|
||||
|
@ -14,36 +83,39 @@ libgit2_proj = cmake.subproject('libgit2', options: opts)
|
|||
libgit2package = libgit2_proj.dependency('libgit2package')
|
||||
|
||||
efsw = dependency('efsw')
|
||||
fmt = subproject('fmt').get_variable('fmt_dep')
|
||||
catch2 = dependency('catch2-with-main')
|
||||
sfml = dependency('sfml')
|
||||
json = dependency('nlohmann_json')
|
||||
imgui = dependency('imgui-sfml')
|
||||
|
||||
dependencies = [
|
||||
fmt, libgit2package, efsw,
|
||||
sfml, imgui, json
|
||||
dependencies += [
|
||||
fmt, json, freetype2,
|
||||
flac, ogg, vorbis, vorbisfile, vorbisenc,
|
||||
sfml_audio, sfml_graphics,
|
||||
sfml_network, sfml_system,
|
||||
sfml_window, libgit2package, efsw
|
||||
]
|
||||
|
||||
subdir('scratchpad')
|
||||
|
||||
executable('escape_turings_tarpit',
|
||||
['game_engine.cpp',
|
||||
sources = [
|
||||
'game_engine.cpp',
|
||||
'dbc.cpp',
|
||||
'gui.cpp',
|
||||
'watcher.cpp',
|
||||
'builder.cpp',
|
||||
'sfmlbackend.cpp',
|
||||
'escape_turings_tarpit.cpp'],
|
||||
]
|
||||
|
||||
|
||||
executable('escape_turings_tarpit', sources + [
|
||||
'escape_turings_tarpit.cpp'
|
||||
],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
override_options: exe_defaults,
|
||||
dependencies: dependencies)
|
||||
|
||||
runtests = executable('runtests', [
|
||||
'dbc.cpp',
|
||||
'game_engine.cpp',
|
||||
executable('runtests', sources + [
|
||||
'tests/game_engine.cpp',
|
||||
'tests/fsm.cpp',
|
||||
'tests/dbc.cpp',
|
||||
],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
override_options: exe_defaults,
|
||||
dependencies: dependencies + [catch2])
|
||||
|
||||
test('tests', runtests)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue