Skip to content

Comments

Prevent enet 1.3.18 from installing its include and static files#280

Merged
TheAssassin merged 2 commits intoblue-nebula:masterfrom
user1-github:patch-1
Dec 10, 2025
Merged

Prevent enet 1.3.18 from installing its include and static files#280
TheAssassin merged 2 commits intoblue-nebula:masterfrom
user1-github:patch-1

Conversation

@user1-github
Copy link
Contributor

Since updating enet to 1.3.18 a few days ago, it has started installing its include and static files with the game (/include/enet and /lib/static/libenet.a) probably due to the addition of these lines in enet 1.3.18 cmakelists file.

I'll admit that I'm not very experienced with cmake so please check if this is correct, but from what I understand, adding EXCLUDE_FROM_ALL after add_subdirectory(${ENET_SOURCE_DIRECTORY} should prevent enet from installing its files but still make it build and statically link with the game.

Since we use strong hardening flags, I thought it makes sense to switch to -D_FORTIFY_SOURCE=3, which is also more aligned with modern distros. However, note that it requires relatively recent compiler versions from about 2022. So if you're interested in being able to build the game on older compilers, we should probably stay on -D_FORTIFY_SOURCE=2.

@TheAssassin
Copy link
Member

Compatibility with Ubuntu 22.04 is absolutely needed. Does this change work with that?

Also, technically, you should split this into two commits. We prefer atomic commits.

@user1-github
Copy link
Contributor Author

Compatibility with Ubuntu 22.04 is absolutely needed. Does this change work with that?

Also, technically, you should split this into two commits. We prefer atomic commits.

Ok,

I just checked, 22.04 uses GCC 11 which doesn't support D_FORTIFY_SOURCE=3, so we'll have to stay on D_FORTIFY_SOURCE=2.

Is everything correct with the enet change?

@user1-github user1-github changed the title Prevent enet 1.3.18 from installing its include and static files + switch to -D_FORTIFY_SOURCE=3 Prevent enet 1.3.18 from installing its include and static files Dec 10, 2025
@TheAssassin
Copy link
Member

Yes, that is exactly how it's done. EXCLUDE_FROM_ALL should have been used there from the beginning, I suppose.

@TheAssassin TheAssassin merged commit 8c7925b into blue-nebula:master Dec 10, 2025
5 checks passed
@TheAssassin
Copy link
Member

Thanks!

@user1-github user1-github deleted the patch-1 branch December 10, 2025 19:41
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.

2 participants