Moved everything around to let meson build the libraries, but I suspect I have too much SFML support gear for it to be useable.
This commit is contained in:
parent
560f506733
commit
838f54a4f4
22 changed files with 36 additions and 26 deletions
2
Makefile
2
Makefile
|
@ -10,7 +10,7 @@ endif
|
|||
%.cpp : %.rl
|
||||
ragel -o $@ $<
|
||||
|
||||
build: lel_parser.cpp
|
||||
build: src/lel_parser.cpp
|
||||
meson compile -j 10 -C builddir
|
||||
|
||||
release_build:
|
||||
|
|
54
meson.build
54
meson.build
|
@ -1,10 +1,10 @@
|
|||
# clang might need _LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
|
||||
|
||||
project('lel-guecs', 'cpp',
|
||||
version: '0.1.0',
|
||||
version: '0.2.0',
|
||||
default_options: [
|
||||
'cpp_std=c++20',
|
||||
'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1',
|
||||
'cpp_args=-D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1'
|
||||
])
|
||||
|
||||
# use this for common options only for our executables
|
||||
|
@ -17,13 +17,6 @@ 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)
|
||||
|
@ -65,7 +58,6 @@ vorbisfile = subproject('vorbis').get_variable('vorbisfile_dep')
|
|||
vorbisenc = subproject('vorbis').get_variable('vorbisenc_dep')
|
||||
sfml_audio = subproject('sfml').get_variable('sfml_audio_dep')
|
||||
sfml_graphics = subproject('sfml').get_variable('sfml_graphics_dep')
|
||||
sfml_network = subproject('sfml').get_variable('sfml_network_dep')
|
||||
sfml_system = subproject('sfml').get_variable('sfml_system_dep')
|
||||
sfml_window = subproject('sfml').get_variable('sfml_window_dep')
|
||||
|
||||
|
@ -73,22 +65,36 @@ dependencies += [
|
|||
fmt, json, freetype2,
|
||||
flac, ogg, vorbis, vorbisfile, vorbisenc,
|
||||
sfml_audio, sfml_graphics,
|
||||
sfml_network, sfml_system,
|
||||
sfml_window
|
||||
sfml_system, sfml_window
|
||||
]
|
||||
|
||||
sources = [
|
||||
'config.cpp',
|
||||
'dbc.cpp',
|
||||
'guecs.cpp',
|
||||
'lel.cpp',
|
||||
'sfml/shaders.cpp',
|
||||
'sfml/sound.cpp',
|
||||
'sfml/textures.cpp',
|
||||
'sfml/components.cpp',
|
||||
'src/config.cpp',
|
||||
'src/dbc.cpp',
|
||||
'src/guecs.cpp',
|
||||
'src/lel.cpp',
|
||||
'src/sfml/shaders.cpp',
|
||||
'src/sfml/sound.cpp',
|
||||
'src/sfml/textures.cpp',
|
||||
'src/sfml/components.cpp',
|
||||
]
|
||||
|
||||
executable('runtests', sources + [
|
||||
lel_guecs_inc = include_directories('include')
|
||||
|
||||
lel_guecs_lib = both_libraries('lel-guecs',
|
||||
sources,
|
||||
version: '0.2.0',
|
||||
soversion: '1',
|
||||
cpp_args: cpp_args,
|
||||
include_directories: lel_guecs_inc,
|
||||
override_options: exe_defaults,
|
||||
dependencies: dependencies)
|
||||
|
||||
lel_guecs_dep = declare_dependency(
|
||||
link_with: lel_guecs_lib,
|
||||
include_directories: lel_guecs_inc)
|
||||
|
||||
executable('runtests', [
|
||||
'tests/lel.cpp',
|
||||
'tests/guecs.cpp',
|
||||
'tests/shaders.cpp',
|
||||
|
@ -98,12 +104,16 @@ executable('runtests', sources + [
|
|||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
override_options: exe_defaults,
|
||||
include_directories: lel_guecs_inc,
|
||||
link_with: [lel_guecs_lib.get_static_lib()],
|
||||
dependencies: dependencies + [catch2])
|
||||
|
||||
executable('calc', sources + [
|
||||
executable('calc', [
|
||||
'demos/calc.cpp',
|
||||
],
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
override_options: exe_defaults,
|
||||
include_directories: lel_guecs_inc,
|
||||
link_with: [lel_guecs_lib.get_static_lib()],
|
||||
dependencies: dependencies)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "shaders.hpp"
|
||||
#include "sfml/shaders.hpp"
|
||||
#include <SFML/Graphics/Image.hpp>
|
||||
#include "dbc.hpp"
|
||||
#include <fmt/core.h>
|
|
@ -1,4 +1,4 @@
|
|||
#include "sound.hpp"
|
||||
#include "sfml/sound.hpp"
|
||||
#include "dbc.hpp"
|
||||
#include <fmt/core.h>
|
||||
#include "config.hpp"
|
|
@ -1,4 +1,4 @@
|
|||
#include "textures.hpp"
|
||||
#include "sfml/textures.hpp"
|
||||
#include <SFML/Graphics/Image.hpp>
|
||||
#include "dbc.hpp"
|
||||
#include <fmt/core.h>
|
Loading…
Add table
Add a link
Reference in a new issue