build: source deps instead of static libs
This commit is contained in:
parent
a023474bdb
commit
deb40d01fc
@ -1,20 +1,4 @@
|
||||
|
||||
browser_sources = files(
|
||||
browser_sources += files(
|
||||
'main.cpp',
|
||||
)
|
||||
|
||||
fmt_dep = dependency('fmt')
|
||||
sdl2_dep = dependency('sdl2')
|
||||
|
||||
executable(
|
||||
'web-browser',
|
||||
browser_sources,
|
||||
win_subsystem: 'console',
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
sdl2_dep,
|
||||
utils_dep,
|
||||
markup_dep,
|
||||
scriptlang_dep,
|
||||
],
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "lexer.hpp"
|
||||
#include "result.hpp"
|
||||
#include "utils/all.hpp"
|
||||
#include <cctype>
|
||||
#include <string_view>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "utils.hpp"
|
||||
#include "utils/all.hpp"
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
|
||||
|
@ -1,28 +1,7 @@
|
||||
|
||||
markup_sources = files(
|
||||
markup_sources += files(
|
||||
'parser.cpp',
|
||||
'lexer.cpp',
|
||||
)
|
||||
|
||||
markup_inc = include_directories('.')
|
||||
|
||||
fmt_dep = dependency('fmt')
|
||||
|
||||
markup_lib = static_library(
|
||||
'web-markup',
|
||||
markup_sources,
|
||||
include_directories: [
|
||||
markup_inc,
|
||||
],
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
utils_dep,
|
||||
],
|
||||
)
|
||||
|
||||
markup_dep = declare_dependency(
|
||||
link_with: markup_lib,
|
||||
include_directories: [
|
||||
markup_inc,
|
||||
],
|
||||
)
|
||||
# markup_inc = include_directories('.')
|
||||
|
46
meson.build
46
meson.build
@ -8,8 +8,52 @@ project(
|
||||
],
|
||||
)
|
||||
|
||||
fmt_dep = dependency('fmt')
|
||||
sdl2_dep = dependency('sdl2')
|
||||
|
||||
|
||||
utils_sources = []
|
||||
subdir('utils')
|
||||
|
||||
scriptlang_sources = []
|
||||
subdir('scriptlang')
|
||||
|
||||
markup_sources = []
|
||||
subdir('markup')
|
||||
subdir('server')
|
||||
|
||||
common_sources = utils_sources + scriptlang_sources + markup_sources
|
||||
|
||||
|
||||
browser_sources = [] + common_sources
|
||||
subdir('browser')
|
||||
browser_sources
|
||||
|
||||
executable(
|
||||
'web-browser',
|
||||
browser_sources,
|
||||
win_subsystem: 'console',
|
||||
include_directories: [
|
||||
include_directories('.'),
|
||||
include_directories('browser'),
|
||||
],
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
sdl2_dep,
|
||||
],
|
||||
)
|
||||
|
||||
server_sources = [] + common_sources
|
||||
subdir('server')
|
||||
|
||||
executable(
|
||||
'web-server',
|
||||
server_sources,
|
||||
win_subsystem: 'console',
|
||||
include_directories: [
|
||||
include_directories('.'),
|
||||
include_directories('server'),
|
||||
],
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
],
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "utils.hpp"
|
||||
#include "utils/all.hpp"
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
|
||||
|
@ -1,28 +1,7 @@
|
||||
|
||||
scriptlang_sources = files(
|
||||
scriptlang_sources += files(
|
||||
'parser.cpp',
|
||||
'lexer.cpp',
|
||||
)
|
||||
|
||||
scriptlang_inc = include_directories('.')
|
||||
|
||||
fmt_dep = dependency('fmt')
|
||||
|
||||
scriptlang_lib = static_library(
|
||||
'web-scriptlang',
|
||||
scriptlang_sources,
|
||||
include_directories: [
|
||||
scriptlang_inc,
|
||||
],
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
utils_dep,
|
||||
],
|
||||
)
|
||||
|
||||
scriptlang_dep = declare_dependency(
|
||||
link_with: scriptlang_lib,
|
||||
include_directories: [
|
||||
scriptlang_inc,
|
||||
],
|
||||
)
|
||||
# scriptlang_inc = include_directories('.')
|
||||
|
@ -1,17 +1,5 @@
|
||||
|
||||
server_sources = files(
|
||||
server_sources += files(
|
||||
'main.cpp',
|
||||
)
|
||||
|
||||
fmt_dep = dependency('fmt')
|
||||
|
||||
server_exe = executable(
|
||||
'web-server',
|
||||
server_sources,
|
||||
win_subsystem: 'console',
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
utils_dep,
|
||||
markup_dep,
|
||||
],
|
||||
)
|
||||
|
@ -1,24 +1,4 @@
|
||||
|
||||
utils_sources = files()
|
||||
|
||||
utils_inc = include_directories('.')
|
||||
|
||||
fmt_dep = dependency('fmt')
|
||||
|
||||
utils_lib = static_library(
|
||||
'web-utils',
|
||||
utils_sources,
|
||||
include_directories: [
|
||||
utils_inc,
|
||||
],
|
||||
dependencies: [
|
||||
fmt_dep,
|
||||
],
|
||||
)
|
||||
|
||||
utils_dep = declare_dependency(
|
||||
link_with: utils_lib,
|
||||
include_directories: [
|
||||
utils_inc,
|
||||
],
|
||||
)
|
||||
# utils_inc = include_directories('.')
|
||||
|
Loading…
Reference in New Issue
Block a user