Skip to content

Commit

Permalink
More meson progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammyjamjamman authored and andy5995 committed Aug 23, 2022
1 parent 3f332f3 commit 9746192
Show file tree
Hide file tree
Showing 4 changed files with 293 additions and 42 deletions.
52 changes: 28 additions & 24 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(
'MegaGlest',
'cpp',
['c', 'cpp'],
version: '3.13.0.999',
meson_version : '>= 0.56.0',
default_options: ['warning_level=0']
Expand All @@ -9,27 +9,31 @@ project(
# Setup compiler.
compiler = meson.get_compiler('cpp')

add_global_arguments(
[
# '-DUSE_STREFLOP',
'-DSTREFLOP_SOFT',
# '-DSTREFLOP_RANDOM_GEN_SIZE=32',
'-DLIBM_COMPILING_FLT32',
'-DN_SPECIALIZED=32',
'-frounding-math',
'-fsignaling-nans',
# '-Wno-switch',
# '-Wuninitialized',
# '-Wsign-compare',
# '-Wunused-function',
# '-Wunused-variable',
# '-Wreturn-type',
'-fno-strict-aliasing',
'-DHAVE_SYS_IOCTL_H',
'-DUNICODE',
# '-O3',
# '-w',
],
language: 'cpp')
#add_global_arguments(
# [
# # '-DUSE_STREFLOP',
# '-DSTREFLOP_SOFT',
# # '-DSTREFLOP_RANDOM_GEN_SIZE=32',
# '-DLIBM_COMPILING_FLT32',
# '-DN_SPECIALIZED=32',
# '-frounding-math',
# '-fsignaling-nans',
# # '-Wno-switch',
# # '-Wuninitialized',
# # '-Wsign-compare',
# # '-Wunused-function',
# # '-Wunused-variable',
# # '-Wreturn-type',
# '-fno-strict-aliasing',
# '-DHAVE_SYS_IOCTL_H',
# '-DUNICODE',
# # '-O3',
# # '-w',
# ],
# language: 'cpp')

subdir('source')
subdir('source/shared_lib')
#subdir('source/glest_game')


#subdir('source')
143 changes: 143 additions & 0 deletions source/glest_game/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
src_game = [
'ai/ai.cpp',
'ai/ai_interface.cpp',
'ai/ai_rule.cpp',
'ai/path_finder.cpp',
'facilities/auto_test.cpp',
'facilities/components.cpp',
'facilities/game_util.cpp',
'facilities/logger.cpp',
'game/achievement.cpp',
'game/chat_manager.cpp',
'game/commander.cpp',
'game/console.cpp',
'game/game_camera.cpp',
'game/game.cpp',
'game/script_manager.cpp',
'game/stats.cpp',
'global/config.cpp',
'global/core_data.cpp',
'global/lang.cpp',
'global/metrics.cpp',
'graphics/particle_type.cpp',
'graphics/renderer.cpp',
'graphics/unit_particle_type.cpp',
'gui/display.cpp',
'gui/gui.cpp',
'gui/selection.cpp',
'main/battle_end.cpp',
'main/intro.cpp',
'main/main.cpp',
'main/program.cpp',
'menu/main_menu.cpp',
'menu/menu_background.cpp',
'menu/menu_state_about.cpp',
'menu/menu_state_connected_game.cpp',
'menu/menu_state_custom_game.cpp',
'menu/menu_state_graphic_info.cpp',
'menu/menu_state_join_game.cpp',
'menu/menu_state_keysetup.cpp',
'menu/menu_state_load_game.cpp',
'menu/menu_state_masterserver.cpp',
'menu/menu_state_mods.cpp',
'menu/menu_state_new_game.cpp',
'menu/menu_state_options.cpp',
'menu/menu_state_options_graphics.cpp',
'menu/menu_state_options_network.cpp',
'menu/menu_state_options_sound.cpp',
'menu/menu_state_root.cpp',
'menu/menu_state_scenario.cpp',
'menu/server_line.cpp',
'network/client_interface.cpp',
'network/connection_slot.cpp',
'network/network_interface.cpp',
'network/network_manager.cpp',
'network/network_message.cpp',
'network/network_protocol.cpp',
'network/network_types.cpp',
'network/server_interface.cpp',
'sound/sound_container.cpp',
'sound/sound_renderer.cpp',
'steam/steam.cpp',
'type_instances/command.cpp',
'type_instances/faction.cpp',
'type_instances/object.cpp',
'type_instances/resource.cpp',
'type_instances/unit.cpp',
'type_instances/upgrade.cpp',
'types/command_type.cpp',
'types/damage_multiplier.cpp',
'types/element_type.cpp',
'types/faction_type.cpp',
'types/object_type.cpp',
'types/projectile_type.cpp',
'types/resource_type.cpp',
'types/skill_type.cpp',
'types/tech_tree.cpp',
'types/tileset_model_type.cpp',
'types/unit_type.cpp',
'types/upgrade_type.cpp',
'world/map.cpp',
'world/minimap.cpp',
'world/scenario.cpp',
'world/surface_atlas.cpp',
'world/tileset.cpp',
'world/time_flow.cpp',
'world/unit_updater.cpp',
'world/water_effects.cpp',
'world/world.cpp',
]


inc_game = [
'types',
'ai',
'menu',
'steam',
'facilities',
'main',
'steamshim',
'network',
'world',
'global',
'type_instances',
'gui',
'sound',
'graphics',
'game',
]

inc_common = [
'../shared_lib/include/platform',
'../shared_lib/include/platform/posix',
'../shared_lib/include/platform/common',
'../shared_lib/include/platform/win32',
'../shared_lib/include/platform/miniupnpc',
'../shared_lib/include/platform/sdl',
'../shared_lib/include/util',
'../shared_lib/include/util/utf8',
'../shared_lib/include/map',
'../shared_lib/include/compression',
'../shared_lib/include/feathery_ftp',
'../shared_lib/include/libircclient',
'../shared_lib/include/libircclient/include',
'../shared_lib/include/streflop',
'../shared_lib/include/streflop/softfloat',
'../shared_lib/include/streflop/libm',
'../shared_lib/include/streflop/libm/headers',
'../shared_lib/include/streflop/libm/flt-32',
'../shared_lib/include/lua',
'../shared_lib/include/xml',
'../shared_lib/include/xml/rapidxml',
'../shared_lib/include/sound',
'../shared_lib/include/sound/openal',
'../shared_lib/include/graphics',
'../shared_lib/include/graphics/gl',
]

executable('megaglest',
src_game,
include_directories: [inc_game, inc_common],
dependencies: [dep_sdl, dep_lua, dep_feathery_ftp],
link_with: [lib_megaglest]
)
107 changes: 89 additions & 18 deletions source/shared_lib/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
subdir('sources/streflop')
# subdir('sources/streflop')
subdir('sources/feathery_ftp')
# subdir('sources/util')

src = []

src_basename = [
'string_utils.cpp',
'util.cpp',
'properties.cpp',
'profiler.cpp',
'leak_dumper.cpp',
'checksum.cpp',
'conversion.cpp',
'randomgen.cpp',
]

foreach file : src_basename
src += [join_paths('sources/util/', file)]
endforeach

inc_util = [

]

src_basename = [
'base_thread.cpp',
Expand All @@ -8,27 +31,75 @@ src_basename = [
'simple_threads.cpp',
]

src = []
foreach file : src_basename
src += [join_paths('sources/platform/common/', file)]
endforeach

dep_curl = dependency('libcurl')
dep_sdl = dependency('sdl2')
dep_x11 = dependency('x11')
dep_openal = dependency('openal')
dep_lua = dependency('lua')
dep_cppunit = dependency('cppunit')
dep_fribidi = dependency('fribidi')
dep_glib = dependency('glib-2.0')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')
#dep_ = dependency('')

#-lcppunit
#-lfribidi
#-lglib-2.0
#-lGL
#-lGLU
#-lSM
#-lICE
#-lXext
#-lopenal
#-llua5.3
#-lm #£ math lib
#-ldl
#-ljpeg
#-lpng
#-lfontconfig
#-lftgl
#-lfreetype
#-lGLEW
#-lminiupnpc
#-lircclient
#-lSDL2main
#-lfribidi
#-lglib-2.0

lib_megaglest = static_library(
'megaglest',
src,
include_directories : [
'include/streflop',
'include/platform/common',
'include/platform/posix',
'include/platform/sdl',
'include/graphics',
'include/util/',
'include/util/utf8',
],
dependencies: [
dep_curl,
dep_sdl, dep_x11, dep_openal, dep_lua,
dep_cppunit,
dep_fribidi,
dep_glib
]
)

# lib_megaglest = static_library(
# 'megaglest',
# src,
# include_directories : [
# 'include/streflop',
# 'include/platform/common',
# 'include/platform/posix',
# 'include/platform/sdl',
# 'include/util',
# 'include/graphics',
# ],
# dependencies: [dep_curl, dep_sdl, dep_streflop]
# # dependencies: [dep_curl, dep_sdl, dep_streflop]
# )

# dep_rmw = declare_dependency(link_with: lib_rmw, include_directories : '..')
# dep_libmegaglest = declare_dependency(link_with: lib_megaglest, include_directories : '..')
33 changes: 33 additions & 0 deletions source/shared_lib/sources/feathery_ftp/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
src_feathery_ftp = [
'ftpTargetWin32.c',
'ftpServer.c',
'ftpTargetPosix.c',
'ftpLib.c',
'ftpRuntime.c',
'ftpCmds.c',
'ftpSession.c',
'ftpAccount.c',
'ftpMessages.c',
]

inc_feathery_ftp = [
'../../include/feathery_ftp/',
]

lib_featheryftp = static_library(
'feathery_ftp',
src_feathery_ftp,
include_directories : inc_feathery_ftp,
# dependencies: [
# dep_curl,
# dep_sdl, dep_x11, dep_openal, dep_lua,
# dep_cppunit,
# dep_fribidi,
# dep_glib
# ]
)

dep_feathery_ftp = declare_dependency(
link_with: lib_featheryftp,
include_directories: inc_feathery_ftp
)

0 comments on commit 9746192

Please sign in to comment.