Include all required sources in libmain.so

This commit is contained in:
loonycyborg 2023-05-25 23:45:01 +03:00
parent b278e1705b
commit e756584e49
No known key found for this signature in database
GPG key ID: 6E8233FAB8F26D61

View file

@ -124,8 +124,11 @@ env_lua.Append(CCFLAGS = Split("-include $wesnoth_lua_config"))
env_lua.Append(CCFLAGS = Split("-x c++"))
objs_lua = env_lua.Object(lua_sources)
shobjs_lua = env_lua.SharedObject(lua_sources)
for obj in objs_lua:
env_lua.Depends(obj, env_lua["wesnoth_lua_config"])
for shobj in shobjs_lua:
env_lua.Depends(shobj, env_lua["wesnoth_lua_config"])
liblua = env_lua.Library("lua", objs_lua)
@ -174,7 +177,7 @@ elif env["PLATFORM"] == 'win32':
client_env.Append(LINKFLAGS=['-Wl,--whole-archive', libwesnoth_widgets, '-Wl,--no-whole-archive'])
elif env["PLATFORM"] == 'android':
client_env["CPPDEFINES"].remove("SDL_MAIN_HANDLED")
wesnoth = client_env.SharedLibrary("#packaging/android/lib/libmain.so", ["wesnoth.cpp"] + wesnoth_client_sources)
wesnoth = client_env.SharedLibrary("#packaging/android/lib/libmain.so", ["wesnoth.cpp"] + sorted(list(set(wesnoth_client_sources).union(set(libwesnoth_sdl_sources)))) + shobjs_lua + libwesnoth_core_sources + libwesnoth_game_sources + libwesnoth_widgets_sources)
Export("wesnoth")
else:
wesnoth = client_env.WesnothProgram("wesnoth", ["wesnoth.cpp"] + libwesnoth_objects, have_client_prereqs)