Prepare CMake build for vcpkg packaging#157
Merged
Merged
Conversation
Two changes needed to package netcode in the vcpkg registry, plus a version fix: - Only default CMAKE_MSVC_RUNTIME_LIBRARY to the static CRT when the integrator hasn't set it. vcpkg validates that installed libraries match the triplet's CRT linkage (dynamic on x64-windows), so the hardcoded static runtime would fail its post-build checks. - Add NETCODE_BUILD_TESTS (defaults ON at top level, following the serialize pattern) so package builds can skip the example, soak, profile and test executables that never get installed. - Bump the CMake project version to 1.3.3: v1.3.2 was tagged with the project version still reporting 1.3.1, the same missed bump that reliable v1.3.2 shipped with. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
netcode.h now reports its version via NETCODE_VERSION_FULL and NETCODE_VERSION_MAJOR/MINOR/PATCH, matching the convention reliable follows. The release check workflow now verifies the header macros agree with each other, with the CMake project version, and with the release tag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ccff00e to
6fa4ade
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares netcode for a port in the microsoft/vcpkg registry, ahead of the next release (v1.3.3, project version already bumped in #155).
CMAKE_MSVC_RUNTIME_LIBRARYto the static CRT when the integrator hasn't set it. vcpkg validates that installed libraries match the triplet's CRT linkage (dynamic onx64-windows), so the hardcoded static runtime would fail its post-build checks. Regular builds are unchanged — the static-CRT default still applies whenever nothing else sets it.NETCODE_BUILD_TESTS(defaults ON at top level, following the serialize pattern) so package builds can skip the client/server/soak/profile/test executables that never get installed.NETCODE_VERSION_FULLandNETCODE_VERSION_MAJOR/MINOR/PATCHmacros to netcode.h — netcode had no version macros — matching the convention reliable follows, and extend the release check workflow from Add release version check workflow #156 to verify the macros agree with each other, with the CMake project version, and with the release tag.Verified locally: builds and passes tests with the option ON, builds the library alone with it OFF, and the vcpkg overlay port for netcode (built with
NETCODE_SYSTEM_SODIUM=ONagainst vcpkg's libsodium) builds against this branch and passes vcpkg post-build validation on arm64-osx.🤖 Generated with Claude Code