Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: Make more modular #211

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

meson: Make more modular #211

wants to merge 1 commit into from

Conversation

andy5995
Copy link
Member

Making things more modular will probably make keeping track of things, and tracking down problems, and keeping track of what depends on what - easier in the long run.

paktool = ['bmp2pak', 'pak2bmp']

foreach tool : paktool
executable(
tool,
tool + '.cpp',
win_subsystem: 'console',
dependencies: (platform_is_windows ? netpanzer_dep_static : netpanzer_dep_shared),
dependencies: paktool_deps,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@winrid Note here especially: we're no longer linking to the entire netpanzer library, but only to a few individual dependencies.

A small advantage in this case, but maybe more useful in the long-term.

cc @Jammyjamjamman

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I remember I noticed in the scons build there was linking to individual objects like that.

@andy5995 andy5995 marked this pull request as draft February 10, 2024 08:27
Copy link
Member

@winrid winrid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is actually how I saw other projects organize the build files so glad we're going in this direction

@andy5995 andy5995 force-pushed the make-modular branch 3 times, most recently from 891651c to 08dcc2d Compare February 12, 2024 14:01
@andy5995
Copy link
Member Author

Nice, this is actually how I saw other projects organize the build files so glad we're going in this direction

I hope it works out ok. The new libraries I created depend on other things... they're not "isolated" libraries for lack of a better term.

Right now this is building on all platforms but Windows.

NetPanzer/Scripts/libnpscript.dll.p/NetPanzerModule.cpp.obj:NetPanzerModule.cpp:(.rdata$.refptr.SERVER[.refptr.SERVER]+0x0): undefined reference to `SERVER'

https://github.com/netpanzer/netpanzer/actions/runs/7872860492/job/21478990447?pr=211

@andy5995
Copy link
Member Author

Now the Windows build fails with a different undef error, and one of the tests on all macos builds fails.

Making things more modular will probably make keeping track of things,
and tracking down problems, and keeping track of what depends on what -
easier in the long run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants