Skip to content

Fix CMake export for external LZ4; doc vcpkg overlays#174

Merged
ptahmose merged 1 commit into
ZEISS:mainfrom
ptahmose:jbl/fix-vcpkg-lz4-config
Jul 13, 2026
Merged

Fix CMake export for external LZ4; doc vcpkg overlays#174
ptahmose merged 1 commit into
ZEISS:mainfrom
ptahmose:jbl/fix-vcpkg-lz4-config

Conversation

@ptahmose

@ptahmose ptahmose commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes the installed CMake package configuration for builds where experimental chunked compression is enabled with an external LZ4 package.

When libCZI is built with LIBCZI_BUILD_EXPERIMENTAL_CHUNKED_COMPRESSION=ON and LIBCZI_BUILD_PREFER_EXTERNALPACKAGE_LZ4=ON, the exported libCZI target can reference an LZ4 CMake target. The generated libCZIConfig.cmake now preserves that build-state and calls find_dependency(lz4 CONFIG REQUIRED) before importing libCZITargets.cmake.

The PR also documents vcpkg usage, including the recommended overlay-port approach for consuming experimental libCZI features, and bumps the version to 0.69.1.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Configured libCZI with the vcpkg toolchain and:

-DLIBCZI_ENABLE_INSTALL=ON
-DLIBCZI_BUILD_EXPERIMENTAL_CHUNKED_COMPRESSION=ON
-DLIBCZI_BUILD_PREFER_EXTERNALPACKAGE_LZ4=ON
-DLIBCZI_BUILD_PREFER_EXTERNALPACKAGE_ZSTD=ON
-DLIBCZI_BUILD_PREFER_EXTERNALPACKAGE_EIGEN3=ON

Verified that the generated libCZIConfig.cmake contains the expected conditional find_dependency(lz4 CONFIG REQUIRED).

Checklist:

  • I followed the Contributing Guidelines.
  • I did a self-review.
  • I commented my code, particularly in hard-to-understand areas.
  • I updated the documentation.
  • I updated the version of libCZI following Versioning of libCZI depending on the type of change
    • Bug fix -> PATCH
    • New feature -> MINOR
    • Breaking change -> MAJOR
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Bump version to 0.69.1. Export experimental chunked-compression and LZ4 CMake options for downstream consumers and ensure lz4 is found if needed. Update documentation to clarify vcpkg usage and overlay ports for experimental features. Update version history accordingly.
@ptahmose ptahmose added the cla Contributor License Agreement sent to Admin label Jul 12, 2026
@ptahmose ptahmose requested a review from Copilot July 12, 2026 06:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes libCZI’s installed CMake package configuration so downstream find_package(libCZI CONFIG REQUIRED) correctly resolves an external LZ4 dependency when experimental chunked compression is enabled, and it updates the docs to better describe vcpkg usage (including overlay ports). It also bumps the project version and records the change in the version history.

Changes:

  • Update libCZIConfig.cmake.in to conditionally find_dependency(lz4 CONFIG REQUIRED) when the installed/exported targets may reference LZ4::....
  • Expand build documentation with a dedicated vcpkg section, including recommended overlay-port workflow for experimental features.
  • Bump version to 0.69.1 and add an entry to the version history.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
docs/source/pages/version_history.md Adds the 0.69.1 entry documenting the fix and vcpkg overlay-port docs.
docs/source/pages/building.rst Adds/expands vcpkg guidance and documents overlay ports for experimental feature consumption.
CMakeLists.txt Bumps project version to 0.69.1.
cmake/libCZIConfig.cmake.in Preserves build flags for chunked compression / external LZ4 and conditionally finds lz4 before importing targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptahmose ptahmose marked this pull request as ready for review July 12, 2026 07:03
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.91%. Comparing base (3ec0807) to head (0ded1f2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #174   +/-   ##
=======================================
  Coverage   67.91%   67.91%           
=======================================
  Files          99       99           
  Lines       13467    13467           
=======================================
  Hits         9146     9146           
  Misses       4321     4321           
Flag Coverage Δ
windows-latest 67.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptahmose ptahmose merged commit 61f74ff into ZEISS:main Jul 13, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla Contributor License Agreement sent to Admin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants