Moved everything around to let meson build the libraries, but I suspect I have too much SFML support gear for it to be useable.

main
Zed A. Shaw 3 days ago
parent 560f506733
commit 838f54a4f4
  1. 2
      Makefile
  2. 0
      include/config.hpp
  3. 0
      include/constants.hpp
  4. 0
      include/dbc.hpp
  5. 0
      include/guecs.hpp
  6. 0
      include/lel.hpp
  7. 0
      include/sfml/color.hpp
  8. 0
      include/sfml/components.hpp
  9. 0
      include/sfml/shaders.hpp
  10. 0
      include/sfml/sound.hpp
  11. 0
      include/sfml/textures.hpp
  12. 54
      meson.build
  13. 0
      src/config.cpp
  14. 0
      src/dbc.cpp
  15. 0
      src/guecs.cpp
  16. 0
      src/lel.cpp
  17. 0
      src/lel_parser.cpp
  18. 0
      src/lel_parser.rl
  19. 0
      src/sfml/components.cpp
  20. 2
      src/sfml/shaders.cpp
  21. 2
      src/sfml/sound.cpp
  22. 2
      src/sfml/textures.cpp

@ -10,7 +10,7 @@ endif
%.cpp : %.rl %.cpp : %.rl
ragel -o $@ $< ragel -o $@ $<
build: lel_parser.cpp build: src/lel_parser.cpp
meson compile -j 10 -C builddir meson compile -j 10 -C builddir
release_build: release_build:

@ -1,10 +1,10 @@
# clang might need _LIBCPP_ENABLE_CXX26_REMOVED_CODECVT # clang might need _LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
project('lel-guecs', 'cpp', project('lel-guecs', 'cpp',
version: '0.1.0', version: '0.2.0',
default_options: [ default_options: [
'cpp_std=c++20', '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 # use this for common options only for our executables
@ -17,13 +17,6 @@ cc = meson.get_compiler('cpp')
dependencies = [] dependencies = []
if build_machine.system() == 'windows' if build_machine.system() == 'windows'
add_global_link_arguments(
'-static-libgcc',
'-static-libstdc++',
'-static',
language: 'cpp',
)
sfml_main = dependency('sfml_main') sfml_main = dependency('sfml_main')
opengl32 = cc.find_library('opengl32', required: true) opengl32 = cc.find_library('opengl32', required: true)
winmm = cc.find_library('winmm', 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') vorbisenc = subproject('vorbis').get_variable('vorbisenc_dep')
sfml_audio = subproject('sfml').get_variable('sfml_audio_dep') sfml_audio = subproject('sfml').get_variable('sfml_audio_dep')
sfml_graphics = subproject('sfml').get_variable('sfml_graphics_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_system = subproject('sfml').get_variable('sfml_system_dep')
sfml_window = subproject('sfml').get_variable('sfml_window_dep') sfml_window = subproject('sfml').get_variable('sfml_window_dep')
@ -73,22 +65,36 @@ dependencies += [
fmt, json, freetype2, fmt, json, freetype2,
flac, ogg, vorbis, vorbisfile, vorbisenc, flac, ogg, vorbis, vorbisfile, vorbisenc,
sfml_audio, sfml_graphics, sfml_audio, sfml_graphics,
sfml_network, sfml_system, sfml_system, sfml_window
sfml_window
] ]
sources = [ sources = [
'config.cpp', 'src/config.cpp',
'dbc.cpp', 'src/dbc.cpp',
'guecs.cpp', 'src/guecs.cpp',
'lel.cpp', 'src/lel.cpp',
'sfml/shaders.cpp', 'src/sfml/shaders.cpp',
'sfml/sound.cpp', 'src/sfml/sound.cpp',
'sfml/textures.cpp', 'src/sfml/textures.cpp',
'sfml/components.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/lel.cpp',
'tests/guecs.cpp', 'tests/guecs.cpp',
'tests/shaders.cpp', 'tests/shaders.cpp',
@ -98,12 +104,16 @@ executable('runtests', sources + [
cpp_args: cpp_args, cpp_args: cpp_args,
link_args: link_args, link_args: link_args,
override_options: exe_defaults, override_options: exe_defaults,
include_directories: lel_guecs_inc,
link_with: [lel_guecs_lib.get_static_lib()],
dependencies: dependencies + [catch2]) dependencies: dependencies + [catch2])
executable('calc', sources + [ executable('calc', [
'demos/calc.cpp', 'demos/calc.cpp',
], ],
cpp_args: cpp_args, cpp_args: cpp_args,
link_args: link_args, link_args: link_args,
override_options: exe_defaults, override_options: exe_defaults,
include_directories: lel_guecs_inc,
link_with: [lel_guecs_lib.get_static_lib()],
dependencies: dependencies) dependencies: dependencies)

@ -1,4 +1,4 @@
#include "shaders.hpp" #include "sfml/shaders.hpp"
#include <SFML/Graphics/Image.hpp> #include <SFML/Graphics/Image.hpp>
#include "dbc.hpp" #include "dbc.hpp"
#include <fmt/core.h> #include <fmt/core.h>

@ -1,4 +1,4 @@
#include "sound.hpp" #include "sfml/sound.hpp"
#include "dbc.hpp" #include "dbc.hpp"
#include <fmt/core.h> #include <fmt/core.h>
#include "config.hpp" #include "config.hpp"

@ -1,4 +1,4 @@
#include "textures.hpp" #include "sfml/textures.hpp"
#include <SFML/Graphics/Image.hpp> #include <SFML/Graphics/Image.hpp>
#include "dbc.hpp" #include "dbc.hpp"
#include <fmt/core.h> #include <fmt/core.h>
Loading…
Cancel
Save