-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Meson Build System to CMaNGOS WotLK
- Loading branch information
Showing
29 changed files
with
1,515 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ad_sources = [ | ||
'loadlib/loadlib.cpp', | ||
'loadlib/adt.cpp', | ||
'loadlib/wdt.cpp', | ||
'dbcfile.cpp', | ||
'mpq_libmpq.cpp', | ||
'System.cpp', | ||
] | ||
|
||
executable('ad', | ||
ad_sources, | ||
link_with: [lib_libmpq], | ||
include_directories: global_includes, | ||
dependencies: [boost_dep, zlib_dep], | ||
link_args: _linker_args, | ||
install_dir: 'bin/tools', | ||
install: true | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
executable('git_id', | ||
'git_id.cpp', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
movemapgen_args = '' | ||
movemapgen_args = [movemapgen_args, '-DMMAP_GENERATOR', '-DNO_CORE_FUNCS', '-DNO_vsnprintf', '-DDT_POLYREF64'] | ||
movemapgen_sources = [ | ||
'src/generator.cpp', | ||
'src/IntermediateValues.cpp', | ||
'src/MapBuilder.cpp', | ||
'src/TerrainBuilder.cpp', | ||
'src/VMapExtensions.cpp' | ||
] | ||
|
||
if build_machine.system() == 'linux' | ||
movemapgen_args = [movemapgen_args, '-ggdb'] | ||
endif | ||
|
||
vmaplib = static_library('vmaplib', | ||
['../../src/game/Vmap/BIH.cpp', '../../src/game/Vmap/VMapManager2.cpp', '../../src/game/Vmap/MapTree.cpp', '../../src/game/Vmap/TileAssembler.cpp', '../../src/game/Vmap/WorldModel.cpp', '../../src/game/Vmap/ModelInstance.cpp', '../../src/game/Vmap/GameObjectModelVmaps.cpp'], | ||
include_directories: global_includes, | ||
dependencies: [zlib_dep, boost_dep], | ||
cpp_args: movemapgen_args, | ||
link_with: [g3dlib, detourlib, recastlib, frameworklib, sharedlib], | ||
install : false | ||
) | ||
|
||
mmaplib = static_library('mmaplib', | ||
['src/generator.cpp', 'src/IntermediateValues.cpp', 'src/MapBuilder.cpp', 'src/TerrainBuilder.cpp', 'src/VMapExtensions.cpp', '../../src/game/MotionGenerators/MoveMapSharedDefines.cpp'], | ||
include_directories: global_includes, | ||
dependencies: [zlib_dep, boost_dep], | ||
cpp_args: movemapgen_args, | ||
link_with: [vmaplib, detourlib, recastlib, g3dlib, frameworklib], | ||
install: false | ||
) | ||
|
||
if get_option('BUILD_EXTRACTORS') | ||
if build_machine.system() == 'linux' | ||
local_linker = [_linker_args, '-rdynamic'] | ||
endif | ||
executable('MoveMapGen', | ||
movemapgen_sources, | ||
link_with: [vmaplib, detourlib, recastlib, mmaplib], | ||
include_directories: global_includes, | ||
dependencies: [boost_dep, zlib_dep], | ||
cpp_args: movemapgen_args, | ||
link_args: _linker_args, | ||
install_dir: 'bin/tools', | ||
install: true | ||
) | ||
install_data(movemapgen_script_file, install_dir: 'bin/tools') | ||
install_data(offmesh_file, install_dir: 'bin/tools') | ||
install_data(config_json_file, install_dir: 'bin/tools') | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
assembler_args = '' | ||
if get_option('DEBUG') | ||
assembler_args = [assembler_args, '-DIOMAP_DEBUG'] | ||
endif | ||
|
||
assembler_args = [assembler_args, '-DNO_CORE_FUNCS'] | ||
|
||
if build_machine.system() == 'linux' | ||
assembler_args = [assembler_args, '-ggdb'] | ||
endif | ||
|
||
vmap_assembler_sources = [ | ||
'../../src/game/Vmap/BIH.cpp', | ||
'../../src/game/Vmap/VMapManager2.cpp', | ||
'../../src/game/Vmap/MapTree.cpp', | ||
'../../src/game/Vmap/TileAssembler.cpp', | ||
'../../src/game/Vmap/WorldModel.cpp', | ||
'../../src/game/Vmap/ModelInstance.cpp', | ||
'vmap_assembler.cpp' | ||
] | ||
|
||
executable('vmap_assembler', | ||
vmap_assembler_sources, | ||
link_with: [sharedlib, g3dlib, frameworklib], | ||
include_directories: global_includes, | ||
dependencies: [boost_dep, zlib_dep], | ||
cpp_args: assembler_args, | ||
link_args: _linker_args, | ||
install_dir: 'bin/tools', | ||
install: true | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
vmap_extractor_args = ['-DIOMAP_DEBUG', '-DUSE_LIBMPQ04'] | ||
|
||
if build_machine.system() == 'linux' | ||
vmap_extractor_args = [vmap_extractor_args, '-ggdb'] | ||
endif | ||
|
||
subdir('vmapextract') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
vmap_extractor_sources = [ | ||
'adtfile.cpp', | ||
'dbcfile.cpp', | ||
'gameobject_extract.cpp', | ||
'model.cpp', | ||
'mpq_libmpq.cpp', | ||
'vmapexport.cpp', | ||
'wdtfile.cpp', | ||
'wmo.cpp' | ||
] | ||
|
||
executable('vmap_extractor', | ||
vmap_extractor_sources, | ||
include_directories: global_includes, | ||
link_with: [g3dlib, lib_libmpq, detourlib, recastlib], | ||
link_args: _linker_args, | ||
install_dir: 'bin/tools', | ||
install: true | ||
) | ||
install_data(extractor_script_file, install_dir: 'bin/tools') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
g3d_sources = [ | ||
'AABox.cpp', | ||
'Any.cpp', | ||
'BinaryFormat.cpp', | ||
'BinaryInput.cpp', | ||
'BinaryOutput.cpp', | ||
'Box.cpp', | ||
'Capsule.cpp', | ||
'CollisionDetection.cpp', | ||
'CoordinateFrame.cpp', | ||
'Crypto.cpp', | ||
'Cylinder.cpp', | ||
'FileSystem.cpp', | ||
'Line.cpp', | ||
'LineSegment.cpp', | ||
'Log.cpp', | ||
'Matrix3.cpp', | ||
'Matrix4.cpp', | ||
'MemoryManager.cpp', | ||
'PhysicsFrame.cpp', | ||
'Plane.cpp', | ||
'Quat.cpp', | ||
'Random.cpp', | ||
'Ray.cpp', | ||
'ReferenceCount.cpp', | ||
'RegistryUtil.cpp', | ||
'Sphere.cpp', | ||
'System.cpp', | ||
'TextInput.cpp', | ||
'TextOutput.cpp', | ||
'Triangle.cpp', | ||
'UprightFrame.cpp', | ||
'Vector2.cpp', | ||
'Vector3.cpp', | ||
'Vector4.cpp', | ||
'debugAssert.cpp', | ||
'fileutils.cpp', | ||
'format.cpp', | ||
'g3dfnmatch.cpp', | ||
'g3dmath.cpp', | ||
'prompt.cpp', | ||
'stringutils.cpp', | ||
'uint128.cpp' | ||
] | ||
|
||
g3d_inc = include_directories('G3D', '../include') | ||
|
||
g3dlib = static_library('g3dlite', | ||
g3d_sources, | ||
include_directories: g3d_inc, | ||
dependencies: zlib_dep, | ||
install : false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
libmpq_sources = [ | ||
'config.h', | ||
'libmpq/common.c', | ||
'libmpq/common.h', | ||
'libmpq/crypt_buf.h', | ||
'libmpq/explode.c', | ||
'libmpq/explode.h', | ||
'libmpq/extract.c', | ||
'libmpq/huffman.c', | ||
'libmpq/huffman.h', | ||
'libmpq/mpq-internal.h', | ||
'libmpq/mpq.c', | ||
'libmpq/mpq.h', | ||
'libmpq/pack_begin.h', | ||
'libmpq/pack_end.h', | ||
'libmpq/platform.h', | ||
'libmpq/wave.c', | ||
'libmpq/wave.h' | ||
] | ||
|
||
libmpq_inc_dir = ['.'] | ||
|
||
if meson.get_compiler('cpp').get_id() == 'msvc' | ||
libmpq_inc_dir = [libmpq_inc_dir, 'win'] | ||
endif | ||
|
||
libmpq_inc = include_directories(libmpq_inc_dir) | ||
|
||
lib_libmpq = static_library('libmpq', | ||
libmpq_sources, | ||
include_directories: libmpq_inc, | ||
dependencies: [zlib_dep, bzip2_dep], | ||
install : false | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if get_option('BUILD_GAME_SERVER') or get_option('BUILD_LOGIN_SERVER') or get_option('BUILD_EXTRACTORS') | ||
subdir('recastnavigation') | ||
subdir('src') | ||
subdir('g3dlite') | ||
if get_option('BUILD_EXTRACTORS') | ||
subdir('libmpq') | ||
endif | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
detour_sources = [ | ||
'Source/DetourAlloc.cpp', | ||
'Source/DetourAssert.cpp', | ||
'Source/DetourCommon.cpp', | ||
'Source/DetourNavMesh.cpp', | ||
'Source/DetourNavMeshBuilder.cpp', | ||
'Source/DetourNavMeshQuery.cpp', | ||
'Source/DetourNode.cpp', | ||
'Include/DetourAlloc.h', | ||
'Include/DetourAssert.h', | ||
'Include/DetourCommon.h', | ||
'Include/DetourMath.h', | ||
'Include/DetourNavMesh.h', | ||
'Include/DetourNavMeshBuilder.h', | ||
'Include/DetourNavMeshQuery.h', | ||
'Include/DetourNode.h', | ||
'Include/DetourStatus.h' | ||
] | ||
|
||
detour_inc = include_directories('Include') | ||
|
||
detourlib = static_library('Detour', | ||
detour_sources, | ||
include_directories: detour_inc, | ||
cpp_args: recastnav_args, | ||
install : false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
recast_sources = [ | ||
'Source/Recast.cpp', | ||
'Source/RecastAlloc.cpp', | ||
'Source/RecastArea.cpp', | ||
'Source/RecastAssert.cpp', | ||
'Source/RecastContour.cpp', | ||
'Source/RecastFilter.cpp', | ||
'Source/RecastLayers.cpp', | ||
'Source/RecastMesh.cpp', | ||
'Source/RecastMeshDetail.cpp', | ||
'Source/RecastRasterization.cpp', | ||
'Source/RecastRegion.cpp', | ||
'Include/Recast.h', | ||
'Include/RecastAlloc.h', | ||
'Include/RecastAssert.h' | ||
] | ||
|
||
recastlib = static_library('recast', | ||
recast_sources, | ||
include_directories: include_directories('Include'), | ||
cpp_args: recastnav_args, | ||
install : false | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if get_option('BUILD_GAME_SERVER') or get_option('BUILD_EXTRACTORS') or get_option('BUILD_RECASTDEMOMOD') | ||
recastnav_args = '-DDT_POLYREF64' | ||
subdir('Detour') | ||
endif | ||
|
||
if get_option('BUILD_EXTRACTORS') or get_option('BUILD_RECASTDEMOMOD') | ||
subdir('Recast') | ||
endif | ||
|
||
if get_option('BUILD_RECASTDEMOMOD') | ||
subdir('DetourCrowd') | ||
subdir('DetourTileCache') | ||
subdir('DebugUtils') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
bzip2_sources = [ | ||
'compress.c', | ||
'crctable.c', | ||
'decompress.c', | ||
'huffman.c', | ||
'randtable.c', | ||
'blocksort.c', | ||
'bzlib.c' | ||
] | ||
|
||
bz2_inc = include_directories('.') | ||
|
||
bz2lib = static_library('bzip2', | ||
bzip2_sources, | ||
include_directories: [global_includes, bz2_inc], | ||
install : false) | ||
|
||
bzip2_dep = declare_dependency( | ||
include_directories: bz2_inc, | ||
link_with: bz2lib | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
gsoap_sources = ['stdsoap2.cpp'] | ||
|
||
gsoaplib = static_library('gsoap', | ||
gsoap_sources, | ||
include_directories: global_includes, | ||
install : false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
subdir('gsoap') | ||
if get_option('BUILD_EXTRACTORS') | ||
bzip2_dep = dependency('bzip2', required: false) | ||
if not bzip2_dep.found() | ||
subdir('bzip2') | ||
endif | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
doxygen = find_program('doxygen', required : false) | ||
if doxygen.found() | ||
doxy_file = configure_file( | ||
configuration: {'PACKAGE': meson.project_name(), 'VERSION': meson.project_version(), 'TOPSRCDIR': meson.source_root(), 'DESTDIR': meson.build_root() + '/doc/docs'}, | ||
input: 'Doxyfile.dist', | ||
output: 'Doxyfile' | ||
) | ||
run_command([doxygen, meson.build_root() + '/doc/Doxyfile'], check: false) | ||
install_subdir(meson.build_root() + '/doc/docs/html', install_dir: 'docs') | ||
else | ||
warning('Documentation disabled without doxygen') | ||
endif |
Oops, something went wrong.