Initial Meson build system
This commit is contained in:
parent
1082e846d9
commit
6ee71ed6c1
|
@ -0,0 +1,21 @@
|
|||
project('FeatherMC', ['c', 'cpp'], version : '0.0', meson_version : '>= 0.49', default_options : [
|
||||
'warning_level=2',
|
||||
])
|
||||
|
||||
add_project_arguments('-DNOMINMAX', language : 'cpp')
|
||||
|
||||
feather_compiler = meson.get_compiler('cpp')
|
||||
feather_cpp_std = 'c++17'
|
||||
feather_platform = target_machine.system()
|
||||
|
||||
if feather_compiler.get_id() == 'msvc'
|
||||
add_project_arguments('/std:' + feather_cpp_std, language : 'cpp')
|
||||
endif
|
||||
|
||||
threads_dep = dependency('threads')
|
||||
|
||||
if feather_platform == 'windows'
|
||||
ws2_32_dep = feather_compiler.find_library('ws2_32')
|
||||
endif
|
||||
|
||||
subdir('src')
|
|
@ -0,0 +1,27 @@
|
|||
feather_src = [
|
||||
'Main.cpp',
|
||||
'DedicatedServer.cpp',
|
||||
|
||||
'util/StringUtil.cpp',
|
||||
'util/SocketUtil.cpp',
|
||||
|
||||
'config/Properties.cpp',
|
||||
'config/ServerProperties.cpp',
|
||||
]
|
||||
|
||||
if feather_platform == 'windows'
|
||||
feather_deps = [
|
||||
threads_dep,
|
||||
ws2_32_dep,
|
||||
]
|
||||
else
|
||||
feather_deps = [
|
||||
threads_dep,
|
||||
]
|
||||
endif
|
||||
|
||||
executable('FeatherMC', feather_src,
|
||||
dependencies : feather_deps,
|
||||
include_directories : include_directories('.'),
|
||||
install : true,
|
||||
override_options : [ 'cpp_std=' + feather_cpp_std ])
|
Loading…
Reference in New Issue