1
0
mirror of synced 2024-11-13 18:20:53 +01:00
jujube/meson.build

55 lines
1.4 KiB
Meson
Raw Permalink Normal View History

2019-10-22 01:53:08 +02:00
project(
'jujube',
2020-03-05 18:14:19 +01:00
['cpp', 'c'],
version : '0.1.0',
default_options : ['cpp_std=c++20'],
2019-10-22 01:53:08 +02:00
)
sources = []
subdir('include') # Defines `inc` and adds stuff in `sources`
2020-05-01 19:11:57 +02:00
subdir('src') # Adds stuff in the `sources` list and defines configuration_inc
2020-05-01 19:11:57 +02:00
cc = meson.get_compiler('cpp')
2020-05-01 19:11:57 +02:00
dependencies = [
dependency('sfml-system', version : '>=2.5.1'),
dependency('sfml-window', version : '>=2.5.1'),
dependency('sfml-graphics', version : '>=2.5.1'),
dependency('sfml-audio', version : '>=2.5.1'),
dependency('threads'),
dependency('gl'),
2023-08-05 15:02:45 +02:00
cc.find_library('atomic'),
dependency('nowide'),
dependency('nlohmann_json')
]
2020-05-01 19:11:57 +02:00
if host_machine.system() == 'linux'
dependencies += [
cc.find_library('m'),
cc.find_library('X11'),
cc.find_library('dw')
]
2020-05-22 11:11:22 +02:00
sources += ['include/backward-cpp/backward.cpp']
add_project_arguments('-DBACKWARD_HAS_DW=1', language : 'cpp')
add_project_link_arguments('-lstdc++', language : 'cpp')
endif
2020-05-01 19:11:57 +02:00
2020-02-19 00:51:26 +01:00
inc = include_directories('include', 'include/imgui', 'include/imgui-sfml')
subdir('test')
2019-10-22 01:53:08 +02:00
executable(
'jujube',
sources: sources,
2020-05-01 19:11:57 +02:00
dependencies: dependencies,
include_directories : inc,
2019-11-03 02:14:47 +01:00
cpp_args : [
'-Wall',
'-Wextra',
'-Wshadow',
'-Wnon-virtual-dtor',
'-pedantic'
],
win_subsystem: 'windows' # mark as GUI app when compiling for windows, hides the console amongst other things
2020-02-19 00:51:26 +01:00
)