Add zlib subproject
This commit is contained in:
parent
14e416b909
commit
8ac6ddfde2
|
@ -5,3 +5,9 @@
|
||||||
[submodule "subprojects/rapidjson"]
|
[submodule "subprojects/rapidjson"]
|
||||||
path = subprojects/rapidjson
|
path = subprojects/rapidjson
|
||||||
url = https://github.com/Tencent/rapidjson/
|
url = https://github.com/Tencent/rapidjson/
|
||||||
|
[submodule "subprojects/cNBT"]
|
||||||
|
path = subprojects/cNBT
|
||||||
|
url = https://github.com/nickelpro/cNBT
|
||||||
|
[submodule "subprojects/zlib"]
|
||||||
|
path = subprojects/zlib
|
||||||
|
url = https://github.com/madler/zlib.git
|
||||||
|
|
45
meson.build
45
meson.build
|
@ -16,6 +16,24 @@ threads_dep = dependency('threads')
|
||||||
|
|
||||||
cmake = import('cmake')
|
cmake = import('cmake')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# zlib
|
||||||
|
########################################
|
||||||
|
|
||||||
|
zlib_vars = cmake.subproject_options()
|
||||||
|
zlib_vars.add_cmake_defines({
|
||||||
|
'BUILD_SHARED_LIBS' : false
|
||||||
|
})
|
||||||
|
zlib_vars.set_install(false)
|
||||||
|
|
||||||
|
zlib_proj = cmake.subproject('zlib', options : zlib_vars)
|
||||||
|
zlib_dep = zlib_proj.dependency('zlibstatic')
|
||||||
|
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# libevent
|
||||||
|
########################################
|
||||||
|
|
||||||
libevent_vars = cmake.subproject_options()
|
libevent_vars = cmake.subproject_options()
|
||||||
libevent_vars.add_cmake_defines({
|
libevent_vars.add_cmake_defines({
|
||||||
'EVENT__DISABLE_OPENSSL' : true,
|
'EVENT__DISABLE_OPENSSL' : true,
|
||||||
|
@ -33,7 +51,32 @@ libevent_proj = cmake.subproject('libevent', options : libevent_vars)
|
||||||
libevent_core_dep = libevent_proj.dependency('event_core_static')
|
libevent_core_dep = libevent_proj.dependency('event_core_static')
|
||||||
libevent_extra_dep = libevent_proj.dependency('event_extra_static')
|
libevent_extra_dep = libevent_proj.dependency('event_extra_static')
|
||||||
|
|
||||||
feather_deps = [ threads_dep, libevent_core_dep, libevent_extra_dep ]
|
########################################
|
||||||
|
# cNBT
|
||||||
|
########################################
|
||||||
|
|
||||||
|
# TODO: cNBT
|
||||||
|
|
||||||
|
#cnbt_vars = cmake.subproject_options()
|
||||||
|
#cnbt_vars.add_cmake_defines({
|
||||||
|
# 'CNBT_BUILD_EXAMPLES' : false,
|
||||||
|
# 'BUILD_SHARED_LIBS' : false,
|
||||||
|
#})
|
||||||
|
|
||||||
|
#cnbt_vars.set_install(false)
|
||||||
|
|
||||||
|
#cnbt_proj = cmake.subproject('cNBT', options : cnbt_vars)
|
||||||
|
#cnbt_dep = cnbt_proj.dependency('nbt')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
|
||||||
|
feather_deps = [
|
||||||
|
threads_dep,
|
||||||
|
zlib_dep,
|
||||||
|
libevent_core_dep,
|
||||||
|
libevent_extra_dep,
|
||||||
|
# cnbt_dep
|
||||||
|
]
|
||||||
|
|
||||||
if feather_platform == 'windows'
|
if feather_platform == 'windows'
|
||||||
ws2_32_dep = feather_compiler.find_library('ws2_32')
|
ws2_32_dep = feather_compiler.find_library('ws2_32')
|
||||||
|
|
|
@ -22,7 +22,11 @@ subdir('protocol')
|
||||||
|
|
||||||
executable('FeatherMC', feather_src, protocol_headers,
|
executable('FeatherMC', feather_src, protocol_headers,
|
||||||
dependencies : feather_deps,
|
dependencies : feather_deps,
|
||||||
include_directories : include_directories('.', '../subprojects/rapidjson/include'),
|
include_directories : include_directories(
|
||||||
|
'.',
|
||||||
|
'../subprojects/rapidjson/include',
|
||||||
|
'../subprojects' # for zlib and cNBT, which have no include dir
|
||||||
|
),
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : meson.source_root() + '/bin',
|
install_dir : meson.source_root() + '/bin',
|
||||||
override_options : [ 'cpp_std=' + feather_cpp_std ])
|
override_options : [ 'cpp_std=' + feather_cpp_std ])
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
|
Loading…
Reference in New Issue